Skip to content

Instantly share code, notes, and snippets.

@fiadliel
Last active August 29, 2015 14:08
Show Gist options
  • Save fiadliel/4071e61b3fd9331a81d4 to your computer and use it in GitHub Desktop.
Save fiadliel/4071e61b3fd9331a81d4 to your computer and use it in GitHub Desktop.
sbt.version=0.13.6
libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.1" % "test"
fork in Test := true
$ sbt "testOnly AllSuites"
[info] Loading project definition from /Users/gcoady/suite-failure/project
[info] Updating {file:/Users/gcoady/suite-failure/project/}suite-failure-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to suite-failure (in build file:/Users/gcoady/suite-failure/)
[info] FailureSuite:
[info] 1
[info] - should equal 2 *** FAILED ***
[info] 1 did not equal 2 (Tests.scala:10)
[info] SuccessSuite:
[info] 1
[info] - should equal 1
[info] Run completed in 827 milliseconds.
[info] Total number of tests run: 2
[info] Suites: completed 3, aborted 0
[info] Tests: succeeded 1, failed 1, canceled 0, ignored 0, pending 0
[info] *** 1 TEST FAILED ***
[success] Total time: 2 s, completed 25-Oct-2014 11:35:24
import org.scalatest._
class AllSuites extends Suites(
new FailureSuite,
new SuccessSuite
)
class FailureSuite extends FlatSpec {
"1" should "equal 2" in {
assert(1 === 2)
}
}
class SuccessSuite extends FlatSpec {
"1" should "equal 1" in {
assert(1 === 1)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment