value should is not a member of String - Scala2.10

926 views Asked by At

I want to cross compile my project across different Scala versions (2.10, 2.11, 2.12). I get this error message while compiling specs for 2.10 only. 2.11 and 2.12 work fine:

value should is not a member of String

Spec class looks as follows:

class ClassNameSpec extends WordSpec with Matchers {
  // ...
}

I have also tried changing WordSpec to FlatSpec and still getting same error.

Using gradle - build.gradle has following related dependencies:

classpath 'gradle.plugin.com.github.maiflai:gradle-scalatest:0.19'

compile "org.scala-lang:scala-library:${scalaVersion}"

compile "org.scalactic:scalactic${scalaVersionSuffix}:3.0.5"

testRuntime 'org.pegdown:pegdown:1.4.2'

How can I make WordSpec or FlatSpec with Matchers work for Scala2.10? If not, what's the best work around?

0

There are 0 answers