Skip to content

Commit

Permalink
add fucnctional spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Juha Paananen committed Nov 23, 2011
1 parent d6acbbb commit 5ab2410
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/g8/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ seq(webSettings :_*)
libraryDependencies ++= Seq(
"org.scalatra" %% "scalatra" % "2.0.1",
"org.scalatra" %% "scalatra-scalate" % "2.0.1",
"org.scalatra" %% "scalatra-specs2" % "2.0.1",
"net.liftweb" %% "lift-json" % "2.4-M4",
"org.specs2" %% "specs2" % "1.6.1" % "test",
"org.specs2" %% "specs2-scalaz-core" % "6.0.1" % "test",
Expand Down
18 changes: 18 additions & 0 deletions src/main/g8/src/test/scala/spike/scalatra/FunctionalSpec.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package spike.scalatra

import org.specs2.mutable._
import org.scalatra.test.specs2.MutableScalatraSpec
import javax.servlet.http.{HttpServlet, HttpServletRequest, HttpServletResponse}

class FunctionalSpec extends MutableScalatraSpec {
args(sequential=true)
addServlet(new RestServlet, "/*")

"get user" should {
"return user info" in {
get("/users/1") {
body must_== """{"name":"john","age":30}"""
}
}
}
}

0 comments on commit 5ab2410

Please sign in to comment.