libraryDependencies += "org.scalatra" %% "scalatra-specs2" % "2.7.0"
import org.scalatra.test.specs2._
class MyScalatraSpec extends ScalatraSpec {
def is =
"My Scalatra application" ^
"should return 200 status at root" ! root200 ^
end
def root200 = get("/") {
status must_== 200
}
}
sbt test
class MyScalatraSpec extends ScalatraSpec {
def is =
"My Scalatra application" ^
"should return 200 status at root" ! root200 ^
end
def root200 = get("/") {
status must_== 200
}
before {
// Set up test environment
// ...
}
after {
// Clean up test environment
// ...
}
}