Skip to content

Instantly share code, notes, and snippets.

@yanana
Created July 29, 2016 05:20
Show Gist options
  • Select an option

  • Save yanana/cd0844ffce4d5c856790faa3d70c4f81 to your computer and use it in GitHub Desktop.

Select an option

Save yanana/cd0844ffce4d5c856790faa3d70c4f81 to your computer and use it in GitHub Desktop.
Solving ScalaTest#427 by upgrading ScalaTest to 3.0.0-RC4
sbt.version = 0.13.12
scalaVersion := "2.11.8"
// libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.5" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.0-RC4" % "test"
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.13.2" % "test"
fork in Test := true
import org.scalatest.prop.GeneratorDrivenPropertyChecks
import org.scalatest.{ Matchers, WordSpec }
class SomeSpec extends WordSpec with Matchers with GeneratorDrivenPropertyChecks {
"this test should fail without sbt exceptions" in {
forAll { value: Int =>
assert(value !== value)
// value shouldNot equal(value)
}
}
"this test should pass without any exceptions in the console" in {
forAll { value: Int =>
value shouldEqual value
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment