-
Notifications
You must be signed in to change notification settings - Fork 181
Open
Labels
Description
When I execute the following example in Intelij:
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.gherkin.Feature
object Spek2Test : Spek({
Feature("Test before and after each scenario") {
beforeFeature {
println("Before Feature")
}
afterFeature {
println("After feature")
}
beforeEachScenario {
println("before scenario")
}
afterEachScenario {
println("after scenario")
}
Scenario("Do something") {
println("Scenario")
}
Scenario("Do something else") {
println("Other Scenario")
}
}
})
I see the following output in my console:
Testing started at 06:48 ...
Scenario
Other Scenario
Before Feature
before scenario
before scenario
after scenario
before scenario
after scenario
After feature
after scenario
Process finished with exit code 0
This doesn't seem correct, I would have expected something like:
Before Feature
before scenario
Scenario
after scenario
before scenario
Other Scenario
after scenario
After feature
What am I doing wrong?