Created
October 17, 2018 07:21
-
-
Save Zuchos/d71ece9ca976175021dc31e5544ce147 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.scalatest.{BeforeAndAfterEach, FlatSpecLike, Suite} | |
trait BaseSpec extends Suite with BeforeAndAfterEach { | |
override protected def beforeEach(): Unit = { | |
super.beforeEach() | |
println("Before Each Base Spec") | |
} | |
} | |
abstract class ExtendedBaseSpec(val name:String) extends BaseSpec { | |
override protected def beforeEach(): Unit = { | |
super.beforeEach() | |
println(s"Before Extended Spec - $name") | |
} | |
} | |
class ExampleSpec extends ExtendedBaseSpec("ExampleSpec") with FlatSpecLike { | |
override protected def beforeEach(): Unit = { | |
super.beforeEach() | |
println("Before Each Example spec") | |
} | |
it should "test" in { | |
assert(condition = true) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment