public void second_step_should_not_run_after_a_failing_step() {
final AtomicBoolean isWhenVisited = new AtomicBoolean(false);
final AtomicBoolean isThenVisited = new AtomicBoolean(false);
final Scenario scenario = new MByHaveSpec() {
Scenario scenario = Scenario("scenario description",
given("given step", (VoidStepImplementation) () -> { throw new AssertionError(); }),
when("when step", () -> { isWhenVisited.set(true); }),
then("then step", () -> { isThenVisited.set(true); }));
}.scenario;
final ScenarioOutput output = scenario.execute(DummyScenarioHooks.DUMMY);
assertFalse("The when step should not run", isWhenVisited.get());
assertFalse("The then step should not run", isThenVisited.get());
assertEquals(ScenarioResult.Failure, output.getResult());