Permalink
Browse files

Changed spec2 dependency to 1.1-SNAPSHOT. Fixed after method in Salat…

…Spec with thanks to @etorreborre for his prompt and helpful advice on the mailing group.
  • Loading branch information...
rktoomey committed Mar 11, 2011
1 parent 493247f commit 8903b1cf53c059208edff21d0b1737c0a40ad845
Showing with 15 additions and 9 deletions.
  1. +1 −1 pom.xml
  2. +1 −2 project/build/SalatProject.scala
  3. +13 −6 salat-core/src/test/scala/com/novus/salat/test/SalatSpec.scala
View
@@ -33,7 +33,7 @@
<commons.lang.version>2.5</commons.lang.version>
<slf4j.simple.version>1.6.0</slf4j.simple.version>
<!-- Test dependencies -->
- <specs2.version>1.0.1</specs2.version>
+ <specs2.version>1.1-SNAPSHOT</specs2.version>
<!-- Build properties -->
<maven-jar-plugin.version>2.2</maven-jar-plugin.version>
<jar.dependency.dist.dir>lib</jar.dependency.dist.dir>
@@ -11,8 +11,7 @@ class SalatProject(info: ProjectInfo) extends ParentProject(info) with posterous
abstract class BaseSalatProject(info: ProjectInfo) extends DefaultProject(info) {
override def compileOptions = super.compileOptions ++ Seq(Unchecked, Deprecation)
- // val specs = "org.scala-tools.testing" %% "specs" % "1.6.7" % "test->default" withSources()
- val specs2 = "org.specs2" %% "specs2" % "1.0.1" % "test->default"
+ val specs2 = "org.specs2" %% "specs2" % "1.1-SNAPSHOT" withSources()
val commonsLang = "commons-lang" % "commons-lang" % "2.5" % "test->default" withSources()
val slf4jSimple = "org.slf4j" % "slf4j-simple" % "1.6.0" % "test->default" withSources()
@@ -24,15 +24,22 @@ import com.mongodb.casbah.commons.Logging
import org.specs2.execute.PendingUntilFixed
import com.mongodb.casbah.Imports._
import org.specs2.mutable._
+import org.specs2.specification.Step
-trait SalatSpec extends Specification with PendingUntilFixed with Logging {
-
+trait SalatSpec extends Specification with Logging {
val SalatSpecDb = "test_salat"
- com.mongodb.casbah.commons.conversions.scala.RegisterConversionHelpers()
- com.mongodb.casbah.commons.conversions.scala.RegisterJodaTimeConversionHelpers()
+ override def is =
+ Step {
+ log.info("beforeSpec: registering BSON conversion helpers")
+ com.mongodb.casbah.commons.conversions.scala.RegisterConversionHelpers()
+ com.mongodb.casbah.commons.conversions.scala.RegisterJodaTimeConversionHelpers()
- // TODO: would be after, but after as we know it has gone away... damn it, I miss you after
- MongoConnection().dropDatabase(SalatSpecDb)
+ } ^
+ super.is ^
+ Step {
+ log.info("afterSpec: dropping test MongoDB '%s'".format(SalatSpecDb))
+ MongoConnection().dropDatabase(SalatSpecDb)
+ }
}

0 comments on commit 8903b1c

Please sign in to comment.