Scalatest 2.0 added thrownBy
, and presumably noException
came with it. You'll need to upgrade scalatest to a 2.x release, which also means upgrading scala to 2.10+
What do I need to import/mixin to make "noException" available in a scalatest?
Question
I'd like to write a test of the form noException should be thrownBy myFunc()
as described in Using Matchers
I can't figure out what class I need to import to put noException
in scope. I'm currently mixing in Flatspec with ShouldMatchers
, and I've tried also doing it with Matchers
What am I missing?
In case it matters, I'm using scalatest 1.9.1 with scala 2.9:
scalaVersion := "2.9.3"
[...]
"org.scalatest" %% "scalatest" % "1.9.1" % "test",
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow