Hi Jacob,
I'd put the beforeEach in the FlatSpec itself, the one you mix the
trait MyBehaviors into. Something like:
trait MySpec extends FlatSpec with BeforeAndAfterEach with MyBehaviors {
def beforeEach() {
// some code that should be performed before each test in the set,
so I put it here
}
"Something" should behave like setOfTests(new Settings1)
"Something" should behave like setOfTests(new Settings2)
}
If you want to use MyBehaviors in more than one Suite class, you can
pull out the beforeEach method into a trait itself that you mix into
all Suite classes that need it.
Bill
> --
> You received this message because you are subscribed to the Google
> Groups "scalatest-users" group.
> To post to this group, send email to
scalate...@googlegroups.com
> To unsubscribe from this group, send email to
>
scalatest-use...@googlegroups.com
> For more options, visit this group at
>
http://groups.google.com/group/scalatest-users?hl=en
> ScalaTest itself, and documentation, is available here:
>
http://www.artima.com/scalatest
> ---
> You received this message because you are subscribed to the Google Groups
> "scalatest-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
scalatest-use...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
--
Bill Venners
Artima, Inc.
http://www.artima.com