Skip to content
This repository

specs2 wip #1301

Merged
merged 17 commits into from almost 2 years ago

5 participants

nafg Diego Medina Dave Whittaker David Pollak Indrajit Raychaudhuri
nafg
nafg commented

Use specs2 rather than the ancient specs.
Among other things allows us to port to 2.10, since specs is obviously not published for 2.10.
Not finished yet --- currently pushed common, actor, json*, util. Locally have webkit, db, mapper too.
Anyone that wants to work on another subproject comment on this ticket first to prevent duplicate work.

nafg
nafg commented

github is showing the dates really weirdly btw...

nafg
nafg commented

Since I'm doing this for the most part subproject by subproject, anyone who wants to review this can begin doing so, but do it by commit rather than by the overall diff, so you can pick up where you left off after future commits.

Diego Medina
Owner

+1

Diego Medina
Owner

+1

Diego Medina
Owner

+1

Diego Medina
Owner

+1

nafg
nafg commented

Now up for review!

Diego Medina

I think it's fine but, could we not use success instead of 1 must_== 1 ?

IIRC no, because it needed a MatchResult, while success is a Result.
What might be better is:

invokeMethod(null, "", "length").getClass must_== classOf[Failure[_]]

(or if specs2 has a built in way to say that).
At the moment I'm pretty swamped though so I'd rather not bother.

Diego Medina
Owner

done with this commit

Diego Medina

does the success here mean that if

         actor => actor must_== Empty

is not Empty, the test case will pass anyway?

Owner

I pulled this branch locally and verified that having the success is just to make specs2 happy, if there is a failure in the previous line, we get a failed test.

Diego Medina
Owner

+1

Diego Medina
Owner

+1

Diego Medina
Owner

+1

Diego Medina
Owner

+1

Diego Medina
Owner

+1

Diego Medina
Owner

+1

Diego Medina
Owner

+1

Diego Medina
Owner

+1

The explicit "forExample" statements were added because there was a conflict with Squeryl's implicit conversion for the "in" operator. I'd just make sure that this is run against all supported Scala versions before we commit to it. It's possible that it was only an older version of Scala that was affected, but it was the previous maintainer who ran into the issue and I'm not sure what triggered it.

Owner

Right now master builds for

Seq("2.9.2", "2.9.1-1", "2.9.1", "2.9.0-1", "2.9.0")

but, there is no specs for version 2.9.0-1 so I think for 2.5, we will only be building 2.9.2 , 2.9.1 (and 2.10 if all goes well I imagine) , I tested locally and 2.9.1 and 2.9.2 pass the tests just fine

Owner
Diego Medina
Owner

Done reviewing all the commits, they all look good, just one thing, could we include a "BoxMatcher" trait, so that users of Lift would not have to do things like boxedVallue.isDefinied must_== true ?

Thanks for all the work with the migration!

Diego Medina
Owner

and when you rebase this into master, I guess it would be time to also drop 2.9.0-1 from build.sbt (You got a few +1 on the lift committer list and I'm pretty sure I also posted the question on the regular list and got a few votes, but I can't find that post now :(

David Pollak dpp merged commit 1980baa into from
David Pollak dpp closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.

Showing 123 changed files with 1,079 additions and 900 deletions. Show diff stats Hide diff stats

  1. +1 1  build.sbt
  2. +5 3 core/actor/src/test/scala/net/liftweb/actor/ActorSpec.scala
  3. +27 26 core/common/src/test/scala/net/liftweb/common/BoxSpec.scala
  4. +4 4 core/common/src/test/scala/net/liftweb/common/ConversionsSpec.scala
  5. +6 6 core/common/src/test/scala/net/liftweb/common/HListSpec.scala
  6. +6 5 core/common/src/test/scala/net/liftweb/common/LoggingSpec.scala
  7. +4 4 core/common/src/test/scala/net/liftweb/common/LruMapSpec.scala
  8. +3 2 core/json-ext/src/test/scala/net/liftweb/json/ext/JodaTimeSerializerSpec.scala
  9. +3 2 core/json-ext/src/test/scala/net/liftweb/json/ext/JsonBoxSerializerSpec.scala
  10. +1 1  core/json-scalaz/src/test/scala/net/lifweb/json/scalaz/Example.scala
  11. +1 1  core/json-scalaz/src/test/scala/net/lifweb/json/scalaz/LottoExample.scala
  12. +1 1  core/json-scalaz/src/test/scala/net/lifweb/json/scalaz/TupleExample.scala
  13. +4 4 core/json-scalaz/src/test/scala/net/lifweb/json/scalaz/ValidationExample.scala
  14. +4 2 core/json/src/test/scala/net/liftweb/json/DiffExamples.scala
  15. +1 1  core/json/src/test/scala/net/liftweb/json/Examples.scala
  16. +6 4 core/json/src/test/scala/net/liftweb/json/ExtractionBugs.scala
  17. +4 2 core/json/src/test/scala/net/liftweb/json/ExtractionExamplesSpec.scala
  18. +1 1  core/json/src/test/scala/net/liftweb/json/FieldSerializerBugs.scala
  19. +4 4 core/json/src/test/scala/net/liftweb/json/FieldSerializerExamples.scala
  20. +21 18 core/json/src/test/scala/net/liftweb/json/JsonAstSpec.scala
  21. +4 2 core/json/src/test/scala/net/liftweb/json/JsonFormatsSpec.scala
  22. +7 4 core/json/src/test/scala/net/liftweb/json/JsonParserSpec.scala
  23. +6 3 core/json/src/test/scala/net/liftweb/json/JsonPrintingSpec.scala
  24. +4 2 core/json/src/test/scala/net/liftweb/json/JsonQueryExamples.scala
  25. +7 4 core/json/src/test/scala/net/liftweb/json/JsonXmlSpec.scala
  26. +4 2 core/json/src/test/scala/net/liftweb/json/LottoExample.scala
  27. +4 2 core/json/src/test/scala/net/liftweb/json/MergeExamples.scala
  28. +3 3 core/json/src/test/scala/net/liftweb/json/ParserBugs.scala
  29. +3 2 core/json/src/test/scala/net/liftweb/json/PullParserExamples.scala
  30. +2 2 core/json/src/test/scala/net/liftweb/json/SerializationBugs.scala
  31. +4 4 core/json/src/test/scala/net/liftweb/json/SerializationExamples.scala
  32. +1 1  core/json/src/test/scala/net/liftweb/json/XmlBugs.scala
  33. +3 2 core/json/src/test/scala/net/liftweb/json/XmlExamples.scala
  34. +10 5 core/util/src/main/scala/net/liftweb/util/Props.scala
  35. +63 62 core/util/src/test/scala/net/liftweb/util/BasicTypesHelpersSpec.scala
  36. +14 6 core/util/src/test/scala/net/liftweb/util/BindHelpersSpec.scala
  37. +3 2 core/util/src/test/scala/net/liftweb/util/BundleBuilderSpec.scala
  38. +8 7 core/util/src/test/scala/net/liftweb/util/ClassHelpersSpec.scala
  39. +27 18 core/util/src/test/scala/net/liftweb/util/CombParserHelpersSpec.scala
  40. +11 4 core/util/src/test/scala/net/liftweb/util/ControlHelpersSpec.scala
  41. +3 2 core/util/src/test/scala/net/liftweb/util/CssSelectorSpec.scala
  42. +8 7 core/util/src/test/scala/net/liftweb/util/CurrencyZoneSpec.scala
  43. +4 3 core/util/src/test/scala/net/liftweb/util/EnumWithDescriptionSpec.scala
  44. +1 1  core/util/src/test/scala/net/liftweb/util/HelpersSpec.scala
  45. +8 7 core/util/src/test/scala/net/liftweb/util/Html5ParserSpec.scala
  46. +3 2 core/util/src/test/scala/net/liftweb/util/HttpHelpersSpec.scala
  47. +3 2 core/util/src/test/scala/net/liftweb/util/JsonCommandSpec.scala
  48. +13 12 core/util/src/test/scala/net/liftweb/util/JsonParserSpec.scala
  49. +3 2 core/util/src/test/scala/net/liftweb/util/ListHelpersSpec.scala
  50. +7 5 core/util/src/test/scala/net/liftweb/util/MailerSpec.scala
  51. +3 2 core/util/src/test/scala/net/liftweb/util/PCDataXmlParserSpec.scala
  52. +9 9 core/util/src/test/scala/net/liftweb/util/ScheduleSpec.scala
  53. +3 2 core/util/src/test/scala/net/liftweb/util/SecurityHelpersSpec.scala
  54. +12 9 core/util/src/test/scala/net/liftweb/util/StringHelpersSpec.scala
  55. +14 9 core/util/src/test/scala/net/liftweb/util/TimeHelpersSpec.scala
  56. +20 19 core/util/src/test/scala/net/liftweb/util/ToHeadSpec.scala
  57. +4 3 core/util/src/test/scala/net/liftweb/util/VCardParserSpec.scala
  58. +3 2 core/util/src/test/scala/net/liftweb/util/XmlParserSpec.scala
  59. +16 10 persistence/couchdb/src/test/scala/net/liftweb/couchdb/CouchDatabaseSpec.scala
  60. +16 10 persistence/couchdb/src/test/scala/net/liftweb/couchdb/CouchDocumentSpec.scala
  61. +15 12 persistence/couchdb/src/test/scala/net/liftweb/couchdb/CouchQuerySpec.scala
  62. +45 41 persistence/couchdb/src/test/scala/net/liftweb/couchdb/CouchRecordSpec.scala
  63. +21 17 persistence/couchdb/src/test/scala/net/liftweb/couchdb/JsonRecordSpec.scala
  64. +5 2 persistence/db/src/test/scala/net/liftweb/db/DBSpec.scala
  65. +10 8 persistence/ldap/src/test/scala/net/liftweb/ldap/LdapSpec.scala
  66. +4 2 persistence/mapper/src/test/scala/net/liftweb/mapper/DbSpec.scala
  67. +4 2 persistence/mapper/src/test/scala/net/liftweb/mapper/ItemsListSpec.scala
  68. +5 3 persistence/mapper/src/test/scala/net/liftweb/mapper/ManyToManySpecs.scala
  69. +5 2 persistence/mapper/src/test/scala/net/liftweb/mapper/MappedBooleanSpec.scala
  70. +4 2 persistence/mapper/src/test/scala/net/liftweb/mapper/MappedDateSpec.scala
  71. +6 3 persistence/mapper/src/test/scala/net/liftweb/mapper/MappedDecimalSpec.scala
  72. +4 3 persistence/mapper/src/test/scala/net/liftweb/mapper/MappedEnumSpec.scala
  73. +11 9 persistence/mapper/src/test/scala/net/liftweb/mapper/MappedLongForeignKeySpec.scala
  74. +27 23 persistence/mapper/src/test/scala/net/liftweb/mapper/MapperSpec.scala
  75. +4 2 persistence/mapper/src/test/scala/net/liftweb/mapper/OneToManySpecs.scala
  76. +5 2 persistence/mapper/src/test/scala/net/liftweb/mapper/SchemifierSpec.scala
  77. +11 10 persistence/mongodb-record/src/test/scala/net/liftweb/mongodb/record/CustomSerializersSpec.scala
  78. +24 22 persistence/mongodb-record/src/test/scala/net/liftweb/mongodb/record/MongoFieldSpec.scala
  79. +16 2 persistence/mongodb-record/src/test/scala/net/liftweb/mongodb/record/MongoRecordExamplesSpec.scala
  80. +50 75 persistence/mongodb-record/src/test/scala/net/liftweb/mongodb/record/MongoRecordSpec.scala
  81. +11 10 persistence/mongodb-record/src/test/scala/net/liftweb/mongodb/record/MongoTestKit.scala
  82. +4 2 persistence/mongodb-record/src/test/scala/net/liftweb/mongodb/record/QueryExamplesSpec.scala
  83. +11 10 persistence/mongodb-record/src/test/scala/net/liftweb/mongodb/record/field/EnumFieldSpec.scala
  84. +12 11 persistence/mongodb-record/src/test/scala/net/liftweb/mongodb/record/field/EnumNameFieldSpec.scala
  85. +5 3 persistence/mongodb/src/test/scala/net/liftweb/mongodb/BsonDSLSpec.scala
  86. +7 6 persistence/mongodb/src/test/scala/net/liftweb/mongodb/CustomSerializersSpec.scala
  87. +7 6 persistence/mongodb/src/test/scala/net/liftweb/mongodb/JObjectParserSpec.scala
  88. +5 2 persistence/mongodb/src/test/scala/net/liftweb/mongodb/MongoDirectSpec.scala
  89. +23 8 persistence/mongodb/src/test/scala/net/liftweb/mongodb/MongoDocumentExamplesSpec.scala
  90. +5 3 persistence/mongodb/src/test/scala/net/liftweb/mongodb/MongoDocumentSpec.scala
  91. +10 5 persistence/mongodb/src/test/scala/net/liftweb/mongodb/MongoSpec.scala
  92. +7 6 persistence/mongodb/src/test/scala/net/liftweb/mongodb/MongoTestKit.scala
  93. +4 2 persistence/mongodb/src/test/scala/net/liftweb/mongodb/QueryExamplesSpec.scala
  94. +43 36 persistence/record/src/test/scala/net/liftweb/record/FieldSpec.scala
  95. +1 2  persistence/record/src/test/scala/net/liftweb/record/Fixtures.scala
  96. +19 20 persistence/record/src/test/scala/net/liftweb/record/RecordSpec.scala
  97. +38 34 persistence/squeryl-record/src/test/scala/net/liftweb/squerylrecord/SquerylRecordSpec.scala
  98. +1 1  project/Build.scala
  99. +6 9 project/Dependencies.scala
  100. +3 2 web/testkit/src/test/scala/net/liftweb/http/testing/MockHttpRequestSpec.scala
  101. +1 1  web/webkit/src/main/scala/net/liftweb/mockweb/MockWeb.scala
  102. +13 25 web/webkit/src/main/scala/net/liftweb/mockweb/WebSpec.scala
  103. +4 2 web/webkit/src/test/scala/net/liftweb/builtin/snippet/MsgSpec.scala
  104. +4 2 web/webkit/src/test/scala/net/liftweb/builtin/snippet/MsgsSpec.scala
  105. +4 3 web/webkit/src/test/scala/net/liftweb/http/BindingsSpec.scala
  106. +3 2 web/webkit/src/test/scala/net/liftweb/http/FactoryMakerSpec.scala
  107. +7 3 web/webkit/src/test/scala/net/liftweb/http/NamedCometPerTabSpec.scala
  108. +5 7 web/webkit/src/test/scala/net/liftweb/http/ReqSpec.scala
  109. +4 2 web/webkit/src/test/scala/net/liftweb/http/ResourceServerSpec.scala
  110. +5 4 web/webkit/src/test/scala/net/liftweb/http/SHtmlSpec.scala
  111. +6 2 web/webkit/src/test/scala/net/liftweb/http/SnippetSpec.scala
  112. +4 2 web/webkit/src/test/scala/net/liftweb/http/js/JsExpSpec.scala
  113. +3 2 web/webkit/src/test/scala/net/liftweb/http/js/extcore/ExtCoreArtifactsSpec.scala
  114. +9 7 web/webkit/src/test/scala/net/liftweb/http/rest/XMLApiSpec.scala
  115. +6 4 web/webkit/src/test/scala/net/liftweb/mockweb/MockWebSpec.scala
  116. +13 16 web/webkit/src/test/scala/net/liftweb/mockweb/WebSpecSpec.scala
  117. +3 2 web/webkit/src/test/scala/net/liftweb/sitemap/LocSpec.scala
  118. +3 2 web/webkit/src/test/scala/net/liftweb/sitemap/MenuDSLSpec.scala
  119. +1 1  web/webkit/src/test/scala/net/liftweb/webapptest/JettyTestServer.scala
  120. +5 3 web/webkit/src/test/scala/net/liftweb/webapptest/MemoizeSpec.scala
  121. +4 9 web/webkit/src/test/scala/net/liftweb/webapptest/OneShot.scala
  122. +23 30 web/webkit/src/test/scala/net/liftweb/webapptest/ToHeadUsages.scala
  123. +3 2 web/wizard/src/test/scala/net/liftweb/wizard/WizardSpec.scala
2  build.sbt
@@ -14,7 +14,7 @@ organizationName in ThisBuild := "WorldWide Conferencing, LLC"
14 14
15 15 crossScalaVersions in ThisBuild := Seq("2.9.2", "2.9.1-1", "2.9.1", "2.9.0-1", "2.9.0")
16 16
17   -libraryDependencies in ThisBuild <++= scalaVersion { sv => Seq(specs, scalacheck).map(_(sv)) }
  17 +libraryDependencies in ThisBuild ++= Seq(specs2, scalacheck)
18 18
19 19 // Settings for Sonatype compliance
20 20 pomIncludeRepository in ThisBuild := { _ => false }
8 core/actor/src/test/scala/net/liftweb/actor/ActorSpec.scala
@@ -17,8 +17,8 @@
17 17 package net.liftweb
18 18 package actor
19 19
20   -import org.specs.Specification
21   -import org.specs.util.TimeConversions._
  20 +import org.specs2.mutable.Specification
  21 +import org.specs2.time.TimeConversions._
22 22
23 23 import common._
24 24
@@ -26,7 +26,9 @@ import common._
26 26 /**
27 27 * Systems under specification for Lift Actor.
28 28 */
29   -object ActorSpec extends Specification("Actor Specification") {
  29 +class ActorSpec extends Specification {
  30 + "Actor Specification".title
  31 + sequential
30 32
31 33 "A Scala Actor" should {
32 34 "support common features" in commonFeatures(new MyScalaActor)
53 core/common/src/test/scala/net/liftweb/common/BoxSpec.scala
@@ -17,16 +17,18 @@
17 17 package net.liftweb
18 18 package common
19 19
20   -import org.specs.{ScalaCheck, Specification}
21   -import org.scalacheck.{Arbitrary, Gen, Prop}
  20 +import org.specs2.mutable.Specification
  21 +import org.specs2.ScalaCheck
  22 +import org.scalacheck.{Arbitrary, Gen}
22 23 import Gen._
23   -import Prop.forAll
24 24
25 25 import Box._
26 26
27 27
28 28 /* commented out because it tests the compilation phase and we want the compiler to "do the right thing"
29   -object TypeBoundsTest extends Specification("Type Bounds Spec") with ScalaCheck {
  29 +object TypeBoundsTest extends Specification with ScalaCheck {
  30 + "Type Bounds Spec".title
  31 +
30 32 "Type bounds" can {
31 33 "do type testing" in {
32 34 def foo[T: ExcludeThisType.exclude[Nothing]#other](a: T) = a.toString
@@ -43,17 +45,17 @@ object TypeBoundsTest extends Specification("Type Bounds Spec") with ScalaCheck
43 45 /**
44 46 * System under specification for Box.
45 47 */
46   -object BoxSpec extends Specification("Box Specification") with ScalaCheck with BoxGenerator {
  48 +class BoxSpec extends Specification with ScalaCheck with BoxGenerator {
47 49
48 50 "A Box" can {
49 51 "be created from a Option. It is Empty if the option is None" in {
50   - Box(None) mustBe Empty
  52 + Box(None) must beEmpty
51 53 }
52 54 "be created from a Option. It is Full(x) if the option is Some(x)" in {
53 55 Box(Some(1)) must_== Full(1)
54 56 }
55 57 "be created from a List containing one element. It is Empty if the list is empty" in {
56   - Box(Nil) mustBe Empty
  58 + Box(Nil) must beEmpty
57 59 }
58 60 "be created from a List containing one element. It is Full(x) if the list is List(x)" in {
59 61 Box(List(1)) must_== Full(1)
@@ -96,10 +98,10 @@ object BoxSpec extends Specification("Box Specification") with ScalaCheck with B
96 98 Full(1).isDefined must beTrue
97 99 }
98 100 "return its value when opened" in {
99   - Full(1).open_! mustBe 1
  101 + Full(1).open_! must_== 1
100 102 }
101 103 "return its value when opened with openOr(default value)" in {
102   - Full(1) openOr 0 mustBe 1
  104 + Full(1) openOr 0 must_== 1
103 105 }
104 106 "return itself when or'ed with another Box" in {
105 107 Full(1) or Full(2) must_== Full(1)
@@ -114,7 +116,7 @@ object BoxSpec extends Specification("Box Specification") with ScalaCheck with B
114 116 Full(1) filter {_ > 0} must_== Full(1)
115 117 }
116 118 "define a 'filter' method, returning Empty if the filter is not satisfied" in {
117   - Full(1) filter {_ == 0} mustBe Empty
  119 + Full(1) filter {_ == 0} must beEmpty
118 120 }
119 121 "define a 'filterMsg' method, returning a Failure if the filter predicate is not satisfied" in {
120 122 Full(1).filterMsg("not equal to 0")(_ == 0) must_== Failure("not equal to 0", Empty, Empty)
@@ -131,7 +133,7 @@ object BoxSpec extends Specification("Box Specification") with ScalaCheck with B
131 133 Full(1) flatMap { x: Int => if (x > 0) Full("full") else Empty } must_== Full("full")
132 134 }
133 135 "define a 'flatMap' method transforming its value in another Box. If the value is transformed in an Empty can, the total result is an Empty can" in {
134   - Full(0) flatMap { x: Int => if (x > 0) Full("full") else Empty } mustBe Empty
  136 + Full(0) flatMap { x: Int => if (x > 0) Full("full") else Empty } must beEmpty
135 137 }
136 138 "define an 'elements' method returning an iterator containing its value" in {
137 139 Full(1).elements.next must_== 1
@@ -224,14 +226,14 @@ object BoxSpec extends Specification("Box Specification") with ScalaCheck with B
224 226 {Empty.open_!; ()} must throwA[NullPointerException]
225 227 }
226 228 "return a default value if opened with openOr" in {
227   - Empty.openOr(1) mustBe 1
  229 + Empty.openOr(1) must_== 1
228 230 }
229 231 "return the other Box if or'ed with another Box" in {
230 232 Empty.or(Full(1)) must_== Full(1)
231 233 }
232 234 "return itself if filtered with a predicate" in {
233 235 val empty: Box[Int] = Empty
234   - empty.filter {_ > 0} mustBe Empty
  236 + empty.filter {_ > 0} must beEmpty
235 237 }
236 238 "define an 'exists' method returning false" in {
237 239 val empty: Box[Int] = Empty
@@ -239,7 +241,7 @@ object BoxSpec extends Specification("Box Specification") with ScalaCheck with B
239 241 }
240 242 "define a 'filter' method, returning Empty" in {
241 243 val empty: Box[Int] = Empty
242   - empty filter {_ > 0} mustBe Empty
  244 + empty filter {_ > 0} must beEmpty
243 245 }
244 246 "define a 'filterMsg' method, returning a Failure" in {
245 247 Empty.filterMsg("not equal to 0")(_ == 0) must_== Failure("not equal to 0", Empty, Empty)
@@ -251,10 +253,10 @@ object BoxSpec extends Specification("Box Specification") with ScalaCheck with B
251 253 total must_== 0
252 254 }
253 255 "define a 'map' method returning Empty" in {
254   - Empty map {_.toString} mustBe Empty
  256 + Empty map {_.toString} must beEmpty
255 257 }
256 258 "define a 'flatMap' method returning Empty" in {
257   - Empty flatMap {x: Int => Full("full")} mustBe Empty
  259 + Empty flatMap {x: Int => Full("full")} must beEmpty
258 260 }
259 261 "define an 'elements' method returning an empty iterator" in {
260 262 Empty.elements.hasNext must beFalse
@@ -306,26 +308,25 @@ object BoxSpec extends Specification("Box Specification") with ScalaCheck with B
306 308
307 309 "A Box equals method" should {
308 310
309   - "return true with comparing two identical Box messages" in {
310   - val equality = (c1: Box[Int], c2: Box[Int]) => (c1, c2) match {
311   - case (Empty, Empty) => c1 == c2
312   - case (Full(x), Full(y)) => (c1 == c2) == (x == y)
313   - case (Failure(m1, e1, l1), Failure(m2, e2, l2)) => (c1 == c2) == ((m1, e1, l1) == (m2, e2, l2))
314   - case _ => c1 != c2
  311 + "return true with comparing two identical Box messages" in check {
  312 + (c1: Box[Int], c2: Box[Int]) => (c1, c2) match {
  313 + case (Empty, Empty) => c1 must_== c2
  314 + case (Full(x), Full(y)) => (c1 == c2) must_== (x == y)
  315 + case (Failure(m1, e1, l1), Failure(m2, e2, l2)) => (c1 == c2) must_== ((m1, e1, l1) == (m2, e2, l2))
  316 + case _ => c1 must be_!=(c2)
315 317 }
316   - forAll(equality) must pass
317 318 }
318 319
319 320 "return false with comparing one Full and another object" in {
320   - Full(1) must_!= "hello"
  321 + Full(1) must be_!=("hello")
321 322 }
322 323
323 324 "return false with comparing one Empty and another object" in {
324   - Empty must_!= "hello"
  325 + Empty must be_!=("hello")
325 326 }
326 327
327 328 "return false with comparing one Failure and another object" in {
328   - Failure("", Empty, Empty) must_!= "hello"
  329 + Failure("", Empty, Empty) must be_!=("hello")
329 330 }
330 331 }
331 332
8 core/common/src/test/scala/net/liftweb/common/ConversionsSpec.scala
@@ -17,15 +17,15 @@
17 17 package net.liftweb
18 18 package common
19 19
20   -import xml._
  20 +import xml.{NodeSeq, Text}
21 21
22   -import org.specs.Specification
  22 +import org.specs2.mutable.Specification
23 23
24 24
25 25 /**
26 26 * System under specification for Conversions.
27 27 */
28   -object ConversionsSpec extends Specification("Conversions Specification") {
  28 +class ConversionsSpec extends Specification {
29 29
30 30 "A StringOrNodeSeq" should {
31 31
@@ -36,7 +36,7 @@ object ConversionsSpec extends Specification("Conversions Specification") {
36 36
37 37 "convert from an Elem" in {
38 38 val sns: StringOrNodeSeq = <b/>
39   - sns.nodeSeq must ==/ ( <b/> )
  39 + sns.nodeSeq must ==/ (<b/>)
40 40 }
41 41
42 42 "convert from a Seq[Node]" in {
12 core/common/src/test/scala/net/liftweb/common/HListSpec.scala
@@ -17,13 +17,13 @@
17 17 package net.liftweb
18 18 package common
19 19
20   -import org.specs.Specification
  20 +import org.specs2.mutable.Specification
21 21
22 22
23 23 /**
24 24 * System under specification for Heterogeneous List.
25 25 */
26   -object HListSpec extends Specification("HList Specification") {
  26 +object HListSpec extends Specification {
27 27
28 28 "An HList" should {
29 29
@@ -49,8 +49,8 @@ object HListSpec extends Specification("HList Specification") {
49 49
50 50 // result in a failure
51 51 x match {
52   - case Left(_) => true must_== true
53   - case _ => fail("Full elements available")
  52 + case Left(_) => success
  53 + case _ => failure
54 54 }
55 55 }
56 56
@@ -69,9 +69,9 @@ object HListSpec extends Specification("HList Specification") {
69 69 val onei: Int = one
70 70 val lstl: List[Int] = lst
71 71
72   - true must_== true
  72 + success
73 73 }
74   - case Left(_) => fail("Failure elements available")
  74 + case Left(_) => failure
75 75 }
76 76 }
77 77
11 core/common/src/test/scala/net/liftweb/common/LoggingSpec.scala
@@ -17,7 +17,7 @@
17 17 package net.liftweb
18 18 package common
19 19
20   -import org.specs.Specification
  20 +import org.specs2.mutable.Specification
21 21
22 22
23 23 /**
@@ -25,7 +25,7 @@ import org.specs.Specification
25 25 *
26 26 * Tests rely on logback being in the classpath, so no configuration should be necessary.
27 27 */
28   -object LoggingSpec extends Specification("Logging Specification") {
  28 +object LoggingSpec extends Specification {
29 29 "Logging" can {
30 30 "be mixed directly into object" in {
31 31 object MyObj extends Logger {
@@ -52,7 +52,7 @@ object LoggingSpec extends Specification("Logging Specification") {
52 52 val logger = Logger("MyLogger")
53 53
54 54 logger.info("Logged with my named logger")
55   - 1 must_== 1
  55 + success
56 56 }
57 57
58 58 "log static MDC values" in {
@@ -69,7 +69,7 @@ object LoggingSpec extends Specification("Logging Specification") {
69 69 logger.info("Logged with mdc2=yy")
70 70 MDC.clear()
71 71 logger.info("Logged with no MDC")
72   - 1 must_== 1
  72 + success
73 73 }
74 74
75 75 "save MDC context with logWith" in {
@@ -88,7 +88,7 @@ object LoggingSpec extends Specification("Logging Specification") {
88 88 logger.info("Logged with mdc1=(1,2), mdc2=yy")
89 89 MDC.clear
90 90 logger.info("No MDC values")
91   - 1 must_== 1
  91 + success
92 92 }
93 93 "trace function results" in {
94 94 object MyObj extends Logger {
@@ -98,6 +98,7 @@ object LoggingSpec extends Specification("Logging Specification") {
98 98 val x = 1
99 99 }
100 100 MyObj.x
  101 + success
101 102 }
102 103
103 104 "be used in different levels and yield different loggers" in {
8 core/common/src/test/scala/net/liftweb/common/LruMapSpec.scala
@@ -17,13 +17,13 @@
17 17 package net.liftweb
18 18 package common
19 19
20   -import org.specs.Specification
  20 +import org.specs2.mutable.Specification
21 21
22 22
23 23 /**
24 24 * Systems under specification for LRU Map.
25 25 */
26   -object LruMapSpec extends Specification("LRU Map Specification") {
  26 +object LruMapSpec extends Specification {
27 27
28 28 "An LRU Map" should {
29 29
@@ -39,7 +39,7 @@ object LruMapSpec extends Specification("LRU Map Specification") {
39 39 for (i <- 1 to 20) lru(i) = i
40 40
41 41 lru.size must_== 10
42   - for (i <- 11 to 20) lru(i) must_== i
  42 + ((i:Int) => lru(i) must_== i).forall(11 to 20)
43 43 }
44 44
45 45 "expire elements to func" in {
@@ -49,7 +49,7 @@ object LruMapSpec extends Specification("LRU Map Specification") {
49 49
50 50 lru.size must_== 10
51 51 expCnt must_== 10
52   - for (i <- 11 to 20) lru(i) must_== i
  52 + ((i:Int) => lru(i) must_== i).forall(11 to 20)
53 53 }
54 54
55 55 "not expire the recently accessed elements" in {
5 core/json-ext/src/test/scala/net/liftweb/json/ext/JodaTimeSerializerSpec.scala
@@ -20,7 +20,7 @@ package ext
20 20
21 21 import org.joda.time._
22 22
23   -import org.specs.Specification
  23 +import org.specs2.mutable.Specification
24 24
25 25 import common._
26 26 import json.Serialization.{read, write => swrite}
@@ -29,7 +29,8 @@ import json.Serialization.{read, write => swrite}
29 29 /**
30 30 * System under specification for JodaTimeSerializer.
31 31 */
32   -object JodaTimeSerializerSpec extends Specification("JodaTimeSerializer Specification") {
  32 +object JodaTimeSerializerSpec extends Specification {
  33 + "JodaTimeSerializer Specification".title
33 34
34 35 implicit val formats = Serialization.formats(NoTypeHints) ++ JodaTimeSerializers.all
35 36
5 core/json-ext/src/test/scala/net/liftweb/json/ext/JsonBoxSerializerSpec.scala
@@ -18,7 +18,7 @@ package net.liftweb
18 18 package json
19 19 package ext
20 20
21   -import org.specs.Specification
  21 +import org.specs2.mutable.Specification
22 22
23 23 import common._
24 24 import json.Serialization.{read, write => swrite}
@@ -27,7 +27,8 @@ import json.Serialization.{read, write => swrite}
27 27 /**
28 28 * System under specification for JsonBoxSerializer.
29 29 */
30   -object JsonBoxSerializerSpec extends Specification("JsonBoxSerializer Specification") {
  30 +object JsonBoxSerializerSpec extends Specification {
  31 + "JsonBoxSerializer Specification".title
31 32
32 33 implicit val formats = net.liftweb.json.DefaultFormats + new JsonBoxSerializer
33 34
2  core/json-scalaz/src/test/scala/net/lifweb/json/scalaz/Example.scala
@@ -5,7 +5,7 @@ import Scalaz._
5 5 import JsonScalaz._
6 6 import net.liftweb.json._
7 7
8   -import org.specs.Specification
  8 +import org.specs2.mutable.Specification
9 9
10 10 object Example extends Specification {
11 11
2  core/json-scalaz/src/test/scala/net/lifweb/json/scalaz/LottoExample.scala
@@ -5,7 +5,7 @@ import Scalaz._
5 5 import JsonScalaz._
6 6 import net.liftweb.json._
7 7
8   -import org.specs.Specification
  8 +import org.specs2.mutable.Specification
9 9
10 10 object LottoExample extends Specification {
11 11 case class Winner(winnerId: Long, numbers: List[Int])
2  core/json-scalaz/src/test/scala/net/lifweb/json/scalaz/TupleExample.scala
@@ -5,7 +5,7 @@ import Scalaz._
5 5 import JsonScalaz._
6 6 import net.liftweb.json._
7 7
8   -import org.specs.Specification
  8 +import org.specs2.mutable.Specification
9 9
10 10 object TupleExample extends Specification {
11 11 "Parse tuple from List" in {
8 core/json-scalaz/src/test/scala/net/lifweb/json/scalaz/ValidationExample.scala
@@ -5,7 +5,7 @@ import Scalaz._
5 5 import JsonScalaz._
6 6 import net.liftweb.json._
7 7
8   -import org.specs.Specification
  8 +import org.specs2.mutable.Specification
9 9
10 10 object ValidationExample extends Specification {
11 11
@@ -30,9 +30,9 @@ object ValidationExample extends Specification {
30 30
31 31 "pass when age within limits" in {
32 32 // Age must be between 16 an 60
33   -// FIXME enable when 2.8 no longer supported, 2.9 needs: import Validation.Monad._
34   -// val person = Person.applyJSON(field("name"), validate[Int]("age") >=> min(16) >=> max(60) apply _)
35   -// person(json) mustEqual Success(Person("joe", 17))
  33 + import Validation.Monad._
  34 + val person = Person.applyJSON(field("name"), validate[Int]("age") >=> min(16) >=> max(60) apply _)
  35 + person(json) mustEqual Success(Person("joe", 17))
36 36 }
37 37 }
38 38
6 core/json/src/test/scala/net/liftweb/json/DiffExamples.scala
@@ -17,13 +17,15 @@
17 17 package net.liftweb
18 18 package json
19 19
20   -import org.specs.Specification
  20 +import org.specs2.mutable.Specification
21 21
22 22
23 23 /**
24 24 * System under specification for Diff Examples.
25 25 */
26   -object DiffExamples extends Specification("Diff Examples") {
  26 +object DiffExamples extends Specification {
  27 + "Diff Examples".title
  28 +
27 29 import MergeExamples.{scala1, scala2, lotto1, lotto2, mergedLottoResult}
28 30
29 31 "Diff example" in {
2  core/json/src/test/scala/net/liftweb/json/Examples.scala
@@ -17,7 +17,7 @@
17 17 package net.liftweb
18 18 package json
19 19
20   -import org.specs.Specification
  20 +import org.specs2.mutable.Specification
21 21
22 22
23 23 object Examples extends Specification {
10 core/json/src/test/scala/net/liftweb/json/ExtractionBugs.scala
@@ -17,13 +17,15 @@
17 17 package net.liftweb
18 18 package json
19 19
20   -import org.specs.Specification
  20 +import org.specs2.mutable.Specification
  21 +
  22 +object ExtractionBugs extends Specification {
  23 + "Extraction bugs Specification".title
21 24
22   -object ExtractionBugs extends Specification("Extraction bugs Specification") {
23 25 implicit val formats = DefaultFormats
24   -
  26 +
25 27 "ClassCastException (BigInt) regression 2 must pass" in {
26   - val opt = OptionOfInt(Some(39))
  28 + val opt = OptionOfInt(Some(39))
27 29 Extraction.decompose(opt).extract[OptionOfInt].opt.get mustEqual 39
28 30 }
29 31
6 core/json/src/test/scala/net/liftweb/json/ExtractionExamplesSpec.scala
@@ -18,9 +18,11 @@ package net.liftweb
18 18 package json
19 19
20 20 import java.util.Date
21   -import org.specs.Specification
  21 +import org.specs2.mutable.Specification
  22 +
  23 +object ExtractionExamples extends Specification {
  24 + "Extraction Examples Specification".title
22 25
23   -object ExtractionExamples extends Specification("Extraction Examples Specification") {
24 26 implicit val formats = DefaultFormats
25 27
26 28 "Extraction example" in {
2  core/json/src/test/scala/net/liftweb/json/FieldSerializerBugs.scala
@@ -17,7 +17,7 @@
17 17 package net.liftweb
18 18 package json
19 19
20   -import org.specs.Specification
  20 +import org.specs2.mutable.Specification
21 21
22 22 object FieldSerializerBugs extends Specification {
23 23 import Serialization.{read, write => swrite}
8 core/json/src/test/scala/net/liftweb/json/FieldSerializerExamples.scala
@@ -17,9 +17,9 @@
17 17 package net.liftweb
18 18 package json
19 19
20   -import org.specs.Specification
  20 +import org.specs2.mutable.Specification
21 21
22   -object FieldSerializerExamples extends Specification {
  22 +object FieldSerializerExamples extends Specification {
23 23 import Serialization.{read, write => swrite}
24 24 import FieldSerializer._
25 25
@@ -33,7 +33,7 @@ object FieldSerializerExamples extends Specification {
33 33 "All fields are serialized by default" in {
34 34 implicit val formats = DefaultFormats + FieldSerializer[WildDog]()
35 35 val ser = swrite(dog)
36   - val dog2 = read[WildDog](ser)
  36 + val dog2 = read[WildDog](ser)
37 37 dog2.name mustEqual dog.name
38 38 dog2.color mustEqual dog.color
39 39 dog2.owner mustEqual dog.owner
@@ -49,7 +49,7 @@ object FieldSerializerExamples extends Specification {
49 49 implicit val formats = DefaultFormats + dogSerializer
50 50
51 51 val ser = swrite(dog)
52   - val dog2 = read[WildDog](ser)
  52 + val dog2 = read[WildDog](ser)
53 53 dog2.name mustEqual dog.name
54 54 dog2.color mustEqual dog.color
55 55 dog2.owner must beNull
39 core/json/src/test/scala/net/liftweb/json/JsonAstSpec.scala
@@ -17,7 +17,8 @@
17 17 package net.liftweb
18 18 package json
19 19
20   -import org.specs.{ScalaCheck, Specification}
  20 +import org.specs2.mutable.Specification
  21 +import org.specs2.ScalaCheck
21 22 import org.scalacheck._
22 23 import org.scalacheck.Prop.{forAll, forAllNoShrink}
23 24
@@ -25,37 +26,39 @@ import org.scalacheck.Prop.{forAll, forAllNoShrink}
25 26 /**
26 27 * System under specification for JSON AST.
27 28 */
28   -object JsonAstSpec extends Specification("JSON AST Specification") with JValueGen with ScalaCheck {
  29 +object JsonAstSpec extends Specification with JValueGen with ScalaCheck {
  30 + "JSON AST Specification".title
  31 +
29 32 "Functor identity" in {
30 33 val identityProp = (json: JValue) => json == (json map identity)
31   - forAll(identityProp) must pass
  34 + check(forAll(identityProp))
32 35 }
33 36
34 37 "Functor composition" in {
35 38 val compositionProp = (json: JValue, fa: JValue => JValue, fb: JValue => JValue) =>
36 39 json.map(fb).map(fa) == json.map(fa compose fb)
37 40
38   - forAll(compositionProp) must pass
  41 + check(forAll(compositionProp))
39 42 }
40 43
41 44 "Monoid identity" in {
42 45 val identityProp = (json: JValue) => (json ++ JNothing == json) && (JNothing ++ json == json)
43   - forAll(identityProp) must pass
  46 + check(forAll(identityProp))
44 47 }
45 48
46 49 "Monoid associativity" in {
47 50 val assocProp = (x: JValue, y: JValue, z: JValue) => x ++ (y ++ z) == (x ++ y) ++ z
48   - forAll(assocProp) must pass
  51 + check(forAll(assocProp))
49 52 }
50 53
51 54 "Merge identity" in {
52 55 val identityProp = (json: JValue) => (json merge JNothing) == json && (JNothing merge json) == json
53   - forAll(identityProp) must pass
  56 + check(forAll(identityProp))
54 57 }
55 58
56 59 "Merge idempotency" in {
57 60 val idempotencyProp = (x: JValue) => (x merge x) == x
58   - forAll(idempotencyProp) must pass
  61 + check(forAll(idempotencyProp))
59 62 }
60 63
61 64 "Diff identity" in {
@@ -63,12 +66,12 @@ object JsonAstSpec extends Specification("JSON AST Specification") with JValueGe
63 66 (json diff JNothing) == Diff(JNothing, JNothing, json) &&
64 67 (JNothing diff json) == Diff(JNothing, json, JNothing)
65 68
66   - forAll(identityProp) must pass
  69 + check(forAll(identityProp))
67 70 }
68 71
69 72 "Diff with self is empty" in {
70 73 val emptyProp = (x: JValue) => (x diff x) == Diff(JNothing, JNothing, JNothing)
71   - forAll(emptyProp) must pass
  74 + check(forAll(emptyProp))
72 75 }
73 76
74 77 "Diff is subset of originals" in {
@@ -76,25 +79,25 @@ object JsonAstSpec extends Specification("JSON AST Specification") with JValueGe
76 79 val Diff(c, a, d) = x diff y
77 80 y == (y merge (c merge a))
78 81 }
79   - forAll(subsetProp) must pass
  82 + check(forAll(subsetProp))
80 83 }
81 84
82 85 "Diff result is same when fields are reordered" in {
83 86 val reorderProp = (x: JObject) => (x diff reorderFields(x)) == Diff(JNothing, JNothing, JNothing)
84   - forAll(reorderProp) must pass
  87 + check(forAll(reorderProp))
85 88 }
86 89
87 90 "Remove all" in {
88 91 val removeAllProp = (x: JValue) => (x remove { _ => true }) == JNothing
89   - forAll(removeAllProp) must pass
  92 + check(forAll(removeAllProp))
90 93 }
91 94
92 95 "Remove nothing" in {
93 96 val removeNothingProp = (x: JValue) => (x remove { _ => false }) == x
94   - forAll(removeNothingProp) must pass
  97 + check(forAll(removeNothingProp))
95 98 }
96 99
97   - "Remove removes only matching elements (in case of a field, its value is set to JNothing)" in {
  100 + "Remove removes only matching elements (in case of a field, its value is set to JNothing)" in check {
98 101 forAllNoShrink(genJValue, genJValueClass) { (json: JValue, x: Class[_ <: JValue]) => {
99 102 val removed = json remove typePredicate(x)
100 103 val Diff(c, a, d) = json diff removed
@@ -103,7 +106,7 @@ object JsonAstSpec extends Specification("JSON AST Specification") with JValueGe
103 106 case _ => true
104 107 }
105 108 c == JNothing && a == JNothing && elemsLeft.forall(_.getClass != x)
106   - }} must pass
  109 + }}
107 110 }
108 111
109 112 "Replace one" in {
@@ -142,8 +145,8 @@ object JsonAstSpec extends Specification("JSON AST Specification") with JValueGe
142 145 // ensure that we test some JObject instances
143 146 val fieldReplacement = (x: JObject, replacement: JObject) => anyReplacement(x, replacement)
144 147
145   - forAll(fieldReplacement) must pass
146   - forAll(anyReplacement) must pass
  148 + check(forAll(fieldReplacement))
  149 + check(forAll(anyReplacement))
147 150 }
148 151
149 152 private def reorderFields(json: JValue) = json map {
6 core/json/src/test/scala/net/liftweb/json/JsonFormatsSpec.scala
@@ -17,12 +17,14 @@
17 17 package net.liftweb
18 18 package json
19 19
20   -import org.specs.Specification
  20 +import org.specs2.mutable.Specification
21 21
22 22 /**
23 23 * System under specification for JSON Formats.
24 24 */
25   -object JsonFormatsSpec extends Specification("JsonFormats Specification") with TypeHintExamples {
  25 +object JsonFormatsSpec extends Specification with TypeHintExamples {
  26 + "JsonFormats Specification".title
  27 +
26 28 implicit val formats = ShortTypeHintExamples.formats + FullTypeHintExamples.formats.typeHints
27 29
28 30 val hintsForFish = ShortTypeHintExamples.formats.typeHints.hintFor(classOf[Fish])
11 core/json/src/test/scala/net/liftweb/json/JsonParserSpec.scala
@@ -17,7 +17,8 @@
17 17 package net.liftweb
18 18 package json
19 19
20   -import org.specs.{ScalaCheck, Specification}
  20 +import org.specs2.mutable.Specification
  21 +import org.specs2.ScalaCheck
21 22 import org.scalacheck.{Arbitrary, Gen}
22 23 import org.scalacheck.Prop._
23 24
@@ -25,16 +26,18 @@ import org.scalacheck.Prop._
25 26 /**
26 27 * System under specification for JSON Parser.
27 28 */
28   -object JsonParserSpec extends Specification("JSON Parser Specification") with JValueGen with ScalaCheck {
  29 +object JsonParserSpec extends Specification with JValueGen with ScalaCheck {
  30 + "JSON Parser Specification".title
  31 +
29 32 "Any valid json can be parsed" in {
30 33 val parsing = (json: JValue) => { parse(Printer.pretty(render(json))); true }
31   - forAll(parsing) must pass
  34 + check(forAll(parsing))
32 35 }
33 36
34 37 "Buffer size does not change parsing result" in {
35 38 val bufSize = Gen.choose(2, 64)
36 39 val parsing = (x: JValue, s1: Int, s2: Int) => { parseVal(x, s1) == parseVal(x, s2) }
37   - forAll(genObject, bufSize, bufSize)(parsing) must pass
  40 + check(forAll(genObject, bufSize, bufSize)(parsing))
38 41 }
39 42
40 43 "Parsing is thread safe" in {
9 core/json/src/test/scala/net/liftweb/json/JsonPrintingSpec.scala
@@ -17,7 +17,8 @@
17 17 package net.liftweb
18 18 package json
19 19
20   -import org.specs.{ScalaCheck, Specification}
  20 +import org.specs2.mutable.Specification
  21 +import org.specs2.ScalaCheck
21 22 import org.scalacheck.Arbitrary
22 23 import org.scalacheck.Prop.forAll
23 24
@@ -25,12 +26,14 @@ import org.scalacheck.Prop.forAll
25 26 /**
26 27 * System under specification for JSON Printing.
27 28 */
28   -object JsonPrintingSpec extends Specification("JSON Printing Specification") with JValueGen with ScalaCheck {
  29 +object JsonPrintingSpec extends Specification with JValueGen with ScalaCheck {
  30 + "JSON Printing Specification".title
  31 +
29 32 import scala.text.Document
30 33
31 34 "rendering does not change semantics" in {
32 35 val rendering = (json: Document) => parse(Printer.pretty(json)) == parse(Printer.compact(json))
33   - forAll(rendering) must pass
  36 + check(forAll(rendering))
34 37 }
35 38
36 39 private def parse(json: String) = scala.util.parsing.json.JSON.parse(json)
6 core/json/src/test/scala/net/liftweb/json/JsonQueryExamples.scala
@@ -17,13 +17,15 @@
17 17 package net.liftweb
18 18 package json
19 19
20   -import org.specs.Specification
  20 +import org.specs2.mutable.Specification
21 21
22 22
23 23 /**
24 24 * System under specification for JSON Query Examples.
25 25 */
26   -object JsonQueryExamples extends Specification("JSON Query Examples") {
  26 +object JsonQueryExamples extends Specification {
  27 + "JSON Query Examples".title
  28 +
27 29 "List of IPs" in {
28 30 val ips = for { JString(ip) <- json \\ "ip" } yield ip
29 31 ips mustEqual List("192.168.1.125", "192.168.1.126", "192.168.1.127", "192.168.2.125", "192.168.2.126")
11 core/json/src/test/scala/net/liftweb/json/JsonXmlSpec.scala
@@ -17,7 +17,8 @@
17 17 package net.liftweb
18 18 package json
19 19
20   -import org.specs.{ScalaCheck, Specification}
  20 +import org.specs2.mutable.Specification
  21 +import org.specs2.ScalaCheck
21 22 import org.scalacheck.Arbitrary
22 23 import org.scalacheck.Prop.forAll
23 24
@@ -25,18 +26,20 @@ import org.scalacheck.Prop.forAll
25 26 /**
26 27 * System under specification for JSON XML.
27 28 */
28   -object JsonXmlSpec extends Specification("JSON XML Specification") with NodeGen with JValueGen with ScalaCheck {
  29 +object JsonXmlSpec extends Specification with NodeGen with JValueGen with ScalaCheck {
  30 + "JSON XML Specification".title
  31 +
29 32 import Xml._
30 33 import scala.xml.Node
31 34
32 35 "Valid XML can be converted to JSON and back (symmetric op)" in {
33 36 val conversion = (xml: Node) => { toXml(toJson(xml)).head == xml }
34   - forAll(conversion) must pass
  37 + check(forAll(conversion))
35 38 }
36 39
37 40 "JSON can be converted to XML, and back to valid JSON (non symmetric op)" in {
38 41 val conversion = (json: JValue) => { parse(compact(render(toJson(toXml(json))))); true }
39   - forAll(conversion) must pass
  42 + check(forAll(conversion))
40 43 }
41 44
42 45 implicit def arbXml: Arbitrary[Node] = Arbitrary(genXml)
6 core/json/src/test/scala/net/liftweb/json/LottoExample.scala
@@ -17,13 +17,15 @@
17 17 package net.liftweb
18 18 package json
19 19
20   -import org.specs.Specification
  20 +import org.specs2.mutable.Specification
21 21
22 22
23 23 /**
24 24 * System under specification for Lotto Examples.