Hi,
Since upgrading to ScalaTest 3.0.x, I noticed that running single tests from within eclipse doesn't work anymore (Right click on a test and then Run As -> ScalaTest - Test).
For reference here's the code taken from the user guide that reproduces the problem:
import org.scalatest.FlatSpec
class SetSpec extends FlatSpec {
"An empty Set" should "have size 0" in {
assert(Set.empty.size == 0)
}
it should "produce NoSuchElementException when head is invoked" in {
assertThrows[NoSuchElementException] {
Set.empty.head
}
}
}
The error message is:
Could not write file: /Users/devendra/code/drj/ws/polaris/.metadata/.plugins/org.eclipse.debug.core/.launches/MethodInvocation(com.drj.polaris.scratch.SetSpec,convertToStringMustWrapperForVerb,class SetSpec extends org.scalatest.FlatSpec {
def -init-()- com.drj.polaris.scratch.SetSpec = {
SetSpec.super.-init-();
()
};
SetSpec.this.convertToInAndIgnoreMethods(SetSpec.this.convertToStringMustWrapperForVerb('An empty Set')(source.this.Position.here).must('have size 0')(SetSpec.this.shorthandTestRegistrationFunction)).in(SetSpec.this.assert(scala.Predef.Set.empty[Nothing].size.==(0))(scalactic.this.Prettifier.default, source.this.Position.here))(source.this.Position.here);
SetSpec.this.it.must('produce NoSuchElementException when head is invoked').in(SetSpec.this.assertThrows[NoSuchElementException](scala.Predef.Set.empty[Nothing].head)(scala.reflect.`package`.materializeClassTag[NoSuchElementException](), source.this.Position.here))(source.this.Position.here)
},SetSpec.this.convertToStringMustWrapperForVerb('An empty Set')(source.this.Position.here),convertToStringMustWrapperForVerb,List(An empty Set)) must have size 0.launch.
Any help/workarounds appreciated.
Thanks,
Devendra