Skip to content

Instantly share code, notes, and snippets.

@omo
Last active December 11, 2015 09:18
Show Gist options
  • Save omo/4579143 to your computer and use it in GitHub Desktop.
Save omo/4579143 to your computer and use it in GitHub Desktop.
logs
project/project
project/target
target
tmp
.settings

This gist will illustrate a bug on the testing facility.

package controllers
import play.api._
import play.api.mvc._
object Application extends Controller {
def index = Action {
Ok("Hello")
}
}
sbt.version=0.12.2
import sbt._
import Keys._
import play.Project._
object ApplicationBuild extends Build {
val appName = "gist4579143"
val appVersion = "0.1"
val appDependencies = Seq(
javaCore, javaJdbc
)
val main = play.Project(appName, appVersion, appDependencies).settings()
}
import org.specs2.mutable._
import play.api.test._
import play.api.test.Helpers._
class AppSpec extends Specification {
"The App" should {
"respond to the index Action" in new WithApplication {
// It works if we remove following lines.
val Some(result) = route(FakeRequest(GET, "/"))
status(result) must equalTo(OK)
}
}
}
// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.1-RC2")
GET / controllers.Application.index
@omo
Copy link
Author

omo commented Jan 21, 2013

SBT 0.12.2 fixes the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment