Skip to content
Browse files

fixed specs tests

  • Loading branch information...
1 parent 1422993 commit 8bba1482014bc6416b4d06f9cfad0e0e5ba1a091 @fmpwizard fmpwizard committed Jun 10, 2013
View
6 scala_210/lift_basic/src/test/scala/code/snippet/HelloWorldTest.scala
@@ -9,7 +9,7 @@ import Helpers._
import lib._
import org.specs2.mutable.Specification
import org.specs2.specification.AroundExample
-import org.specs2.execute.Result
+import org.specs2.execute.AsResult
object HelloWorldTestSpecs extends Specification with AroundExample{
@@ -20,10 +20,10 @@ object HelloWorldTestSpecs extends Specification with AroundExample{
* For additional ways of writing tests,
* please see http://www.assembla.com/spaces/liftweb/wiki/Mocking_HTTP_Requests
*/
- def around[T <% Result](body: => T) = {
+ def around[T : AsResult](body: =>T) = {
S.initIfUninitted(session) {
DependencyFactory.time.doWith(stableTime) {
- body
+ AsResult( body) // execute t inside a http session
}
}
}
View
6 scala_210/lift_blank/src/test/scala/code/snippet/HelloWorldTest.scala
@@ -9,7 +9,7 @@ import Helpers._
import lib._
import org.specs2.mutable.Specification
import org.specs2.specification.AroundExample
-import org.specs2.execute.Result
+import org.specs2.execute.AsResult
object HelloWorldTestSpecs extends Specification with AroundExample{
@@ -20,10 +20,10 @@ object HelloWorldTestSpecs extends Specification with AroundExample{
* For additional ways of writing tests,
* please see http://www.assembla.com/spaces/liftweb/wiki/Mocking_HTTP_Requests
*/
- def around[T <% Result](body: => T) = {
+ def around[T : AsResult](body: =>T) = {
S.initIfUninitted(session) {
DependencyFactory.time.doWith(stableTime) {
- body
+ AsResult( body) // execute t inside a http session
}
}
}

0 comments on commit 8bba148

Please sign in to comment.
Something went wrong with that request. Please try again.