ScalaTest is published for Scala 3 RC1, but when I am trying to use ScalaTest in a Scala 3 project it results in errors like:
[error] 11 | stack.pop() should be (2)
[error] | ^^^^^^^^^^^^^^^^^^
[error] |value should is not a member of Int, but could be made available as an extension method.
[error] |
[error] |The following import might make progress towards fixing the problem:
Even the sample ExampleSpec
from the ScalaTest front page does not compile:
Is there some trick to make it work?
Works for me with 3.0.0-RC1. IntelliJ compiles it but doesn’t offer any “Run” option for the test suite - that’s probably related to this bug, which seems to have been resolved in the meantime, but I’m still with an older plugin version. sbt test
works just fine, though.
@sangamon Did you try with running the ExampleSpec
sample linked earlier? It does not work neither in SBT (RC2 and scalatest 3.2.7) nor in Scastie (RC2 and scalatest 3.2.6).
The problem may be with parts of ScalaTest. The example fails with AnyFlatSpec
and should
matchers. I tried AnyWordSpec
and it was fine, but my projects relies on thousands of tests using AnyFlatSpec
If you have a simple running SBT project with ScalaTest can you share it?