Created
September 7, 2013 20:48
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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