Skip to content

Instantly share code, notes, and snippets.

@danmbyrd
Created November 7, 2014 23:51
Show Gist options
  • Save danmbyrd/b4d9ec4168a19de59264 to your computer and use it in GitHub Desktop.
Save danmbyrd/b4d9ec4168a19de59264 to your computer and use it in GitHub Desktop.
ParallelTestExecution causes sbt to think tests always pass.
sbt.version=0.13.6
package org.acme.dummy
import sbt._
import sbt.Keys._
object DummyBuild extends Build {
val coreProject = Project(
id = "dummy",
base = file("."),
settings = Seq(
name := "dummy",
scalaVersion := "2.10.4",
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "2.2.2" % "test"),
parallelExecution in Test := true,
concurrentRestrictions := Seq(Tags.limitAll(100))
)
)
}
package org.acme.dummy
import org.scalatest.{Matchers, FlatSpec, ParallelTestExecution}
class DummySpec extends FlatSpec with Matchers with ParallelTestExecution {
"numbers" should "add" in {
(2 + 2) shouldBe 4
}
"numbers" should "negate" in {
// Whoops, failing test
2 - 2 shouldBe 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment