Created
May 15, 2015 11:35
-
-
Save pjazdzewski1990/dd12c380ac736a5c876c 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.specs2.mutable.Specification | |
import org.specs2.specification.{Step, Fragments} | |
trait BeforeAllAfterAll extends Specification { | |
override def map(fragments: => Fragments) = | |
Step(beforeAll) ^ fragments ^ Step(afterAll) | |
protected def beforeAll() | |
protected def afterAll() | |
} | |
class MathSpec extends Specification with BeforeAllAfterAll { | |
def beforeAll() { | |
println("Starting MathSpec") | |
} | |
def afterAll() { | |
println("Ending MathSpec") | |
} | |
"Math" should { | |
"divide" in { | |
8/2 === 4 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment