You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trait Builder extends SuiteMixin { this: Suite =>
val builder = new StringBuilder
abstract override def withFixture(test: NoArgTest) = {
builder.append("ScalaTest is ")
try super.withFixture(test) // To be stackable, must call super.withFixture
finally builder.clear()
}
}
[...]
Errors:
[error] /home/simon/atomWorkspace/scala/scalabc/sub/ui/src/test/scala/scalabc/ui/UiTest.scala:17: not found: type NoArgTest
[error] abstract override def withFixture(test: NoArgTest) = {
[error] ^
[error] /home/simon/atomWorkspace/scala/scalabc/sub/ui/src/test/scala/scalabc/ui/UiTest.scala:19: value withFixture is not a member of org.scalatest.SuiteMixin
[error] try super.withFixture(test) // To be stackable, must call super.withFixture
[error] ^
[error] /home/simon/atomWorkspace/scala/scalabc/sub/ui/src/test/scala/scalabc/ui/UiTest.scala:28: not found: type NoArgTest
[error] abstract override def withFixture(test: NoArgTest) = {
[error] ^
[error] /home/simon/atomWorkspace/scala/scalabc/sub/ui/src/test/scala/scalabc/ui/UiTest.scala:29: value withFixture is not a member of org.scalatest.SuiteMixin
On page http://www.scalatest.org/user_guide/sharing_fixtures#composingFixtures
(in section Composing fixtures by stacking traits)
The tutorial code does not compile.
Errors:
Solution:
http://www.scalatest.org/release_notes/3.0.0 states that you have to use TestSuiteXYZ everywhere
i.e. replace
SuiteMixin
withTestSuiteMixin
,Suite
withTestSuite
.Nontrivial to find the solution by googling, breaks
Great website nonetheless! Quite good cheat sheets too!
The text was updated successfully, but these errors were encountered: