I have a project configured with scalatest that I am running in Eclipse Mars 2. I have Scala IDE installed and all is well. I am able to run Scala tests correctly, however I have a very annoying issue. All of my uses of "should", "shouldBe", etc. are marked as syntax errors with "value should is not a member of... " (String, Int, etc.).
My base class extends WordSpecLike with Matchers. As far as I understand from this post scalatest "A stack" should "do something" -- wtf? How is should a method of string? there should be an implicit conversation happening from the various types (or at least from String) to the wrapper that defines the "should" method. It appears that the implicit conversation is not happening? However, tests run just fine, so I am confused.
Any help would be appreciated.
Relevant code fragments below. Both instances of "should" and "shouldBe" are marked as syntax errors (respectively not a member of String and Int).
import org.scalatest._
abstract class CommonUnitTest extends WordSpecLike with Matchers
abstract class CassandraSparkTest extends CommonUnitTest with BeforeAndAfterEach with BeforeAndAfterAll
class DocumentScopeAggregationJobTest extends CassandraSparkTest {
"DocumentScopeAggregationJob" should {
"create a running step from DocumentScope table" in {
...
val steps = runningScope.steps
steps.size shouldBe 1
}
}
}