Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid example for 'Sharing fixtures', 'Composing fixtures by stacking traits' #60

Open
hipnoizz opened this issue Nov 27, 2016 · 0 comments
Assignees

Comments

@hipnoizz
Copy link

This section contains example which does not compile under ScalaTest 3.0.0 and 3.0.1.

package org.scalatest.examples.flatspec.composingwithfixture

import org.scalatest._
import collection.mutable.ListBuffer

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()
  }
}
...

Should it be TestSuiteMixin instead SuiteMixin and TestSuite instead Suite?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants