import org.scalatest.{FunSuite, BeforeAndAfterEach, Suite, OneInstancePerTest}
trait MyFixture extends BeforeAndAfterEach { this: Suite => override protected def beforeEach(): Unit = { super.beforeEach() println("beforeEach") } override protected def afterEach(): Unit = { println("afterEach") super.afterEach() }}class MyTest extends FunSuite with MyFixture with OneInstancePerTest { test("1") { assert(1 === 1) } test("2") { assert(1 === 1) }}
beforeEachafterEachbeforeEachafterEach
class MyTest extends FunSuite with OneInstancePerTest with MyFixture
beforeEachbeforeEachafterEachafterEachbeforeEachbeforeEachafterEachafterEach
I found a similar result, I wrote a test for it on a PR on github a few days ago. I also didn't know why.
--
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.