I have an eclipse scala project which uses maven. Eclipse plugins for ScalaIDE and Scalatest are installed. I have tests like:
import org.scalatest._
class ExampleSpec extends FlatSpec with Matchers {
feature("Feature A Test") {
scenario("Foo scenario 1") {
val a = FooClass().getResult()
a.count shouldBe 1 // IDE shows error: value shouldBe is not a member of Long
a(0).getString(0) shouldBe "FOO" // IDE shows error: value shouldBe is not a member of String
}
}
}
The maven compilation and the tests run fine, but in eclipse when I open this file, I see an error in eclipse wherever I am using a Matcher as mentioned in the comments above. Eg.
value shouldBe is not a member of Long
What am I missing? A scala test file shows hundreds of problems.
MyClass extends FeatureSpec with BeforeAndAfterAll with Matchers. What do you mean by "mixed in matchers", not sure I understand by looking at the link? - rgamberMyClass extends FeatureSpec with BeforeAndAfterAll with Matcherswith theimport org.scalatest.Matchers. I am not usingimport Matchers._. - rgamber