Permalink
Browse files

Removed HttpTester from specs2, specs and scalatest

  • Loading branch information...
1 parent f1403bc commit 41348c18148c3f381036a424a09fd8cced9ed73e @mnylen mnylen committed Jul 18, 2012
@@ -2,7 +2,6 @@ package org.scalatra.test
package scalatest
import org.junit.runner.RunWith
-import org.eclipse.jetty.testing.ServletTester
import org.scalatest._
import org.scalatest.matchers.{MustMatchers, ShouldMatchers}
import org.scalatest.junit.{JUnitSuite, JUnit3Suite, JUnitRunner}
@@ -14,8 +13,6 @@ import org.scalatest.testng.TestNGSuite
* is started before the first test in the suite and stopped after the last.
*/
trait ScalatraSuite extends Suite with ScalatraTests with BeforeAndAfterAll with MustMatchers with ShouldMatchers {
- lazy val tester = new ServletTester
-
override protected def beforeAll(): Unit = start()
override protected def afterAll(): Unit = stop()
}
@@ -2,18 +2,11 @@ package org.scalatra.test.specs
import org.scalatra.test.ScalatraTests
import org.specs._
-import scala.util.DynamicVariable
-import org.eclipse.jetty.testing.ServletTester
/**
* A Specification that starts the tester before the specification and stops it afterward.
*/
trait ScalatraSpecification extends Specification with ScalatraTests {
- // This hack lets us share the tester through the specification, starting/stopping it only once, while resetting
- // the rest of the fixture variables for each example according to the default execution model of specs.
- private lazy val _tester = new DynamicVariable[ServletTester](new ServletTester)
- def tester = _tester.value
-
doBeforeSpec { start() }
doAfterSpec { stop() }
@@ -2,7 +2,6 @@ package org.scalatra
package test
package specs2
-import org.eclipse.jetty.testing.ServletTester
import org.specs2.specification.{BaseSpecification, Step, Fragments}
/**
@@ -11,7 +10,5 @@ import org.specs2.specification.{BaseSpecification, Step, Fragments}
* ScalatraSpec or MutableScalatraSpec.
*/
trait BaseScalatraSpec extends BaseSpecification with ScalatraTests {
- lazy val tester = new ServletTester
-
override def map(fs: =>Fragments) = Step(start()) ^ super.map(fs) ^ Step(stop())
}

0 comments on commit 41348c1

Please sign in to comment.