Skip to content

Instantly share code, notes, and snippets.

@rishabh9
Created September 7, 2013 20:48
Show Gist options
  • Save rishabh9/6479163 to your computer and use it in GitHub Desktop.
Save rishabh9/6479163 to your computer and use it in GitHub Desktop.
The workaround to the issue where the unit test cases do not run on play framework v2.1.3
import sbt._
import Keys._
import play.Project._
object ApplicationBuild extends Build {
val appName = "zentasks"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
// Add your project dependencies here,
javaCore,
javaJdbc,
javaEbean
)
val main = play.Project(appName, appVersion, appDependencies).settings(
// Add the below lines for unit test cases to work on v2.1.3
testOptions in Test ~= { args =>
for {
arg <- args
val ta: Tests.Argument = arg.asInstanceOf[Tests.Argument]
val newArg = if(ta.framework == Some(TestFrameworks.JUnit)) ta.copy(args = List.empty[String]) else ta
} yield newArg
}
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment