@@ -82,24 +82,20 @@ public void hooks_execute_also_after_failure() throws Throwable {
82
82
inOrder .verify (beforeHook ).execute (Matchers .<Scenario >any ());
83
83
inOrder .verify (afterHook ).execute (Matchers .<Scenario >any ());
84
84
}
85
+
86
+ @ Test
87
+ public void steps_are_executed () throws Throwable {
88
+ final StepDefinition stepDefinition = mock (StepDefinition .class );
89
+ runtime .getRunner ().runPickle (createPickleEventMatchingStepDefinitions (asList (stepDefinition ), runtime ));
90
+ verify (stepDefinition ).execute (Matchers .anyString (), Matchers .<Object []>any ());
91
+ }
85
92
86
93
@ Test
87
94
public void steps_are_not_executed_on_dry_run () throws Throwable {
88
- // Step without dry-run flag should be executed once
89
- {
90
- StepDefinition stepDefinition = mock (StepDefinition .class );
91
- Runtime runtime = createRuntime (backend );
92
- runtime .getRunner ().runPickle (createPickleEventMatchingStepDefinitions (asList (stepDefinition ), runtime ));
93
- verify (stepDefinition ).execute (Matchers .anyString (), Matchers .<Object []>any ());
94
- }
95
-
96
- // Same step with dry-run flag should not be executred
97
- {
98
- StepDefinition stepDefinition = mock (StepDefinition .class );
99
- Runtime dryRuntime = createRuntime (backend , "--dry-run" );
100
- dryRuntime .getRunner ().runPickle (createPickleEventMatchingStepDefinitions (asList (stepDefinition ), dryRuntime ));
101
- verify (stepDefinition , never ()).execute (Matchers .anyString (), Matchers .<Object []>any ());
102
- }
95
+ final StepDefinition stepDefinition = mock (StepDefinition .class );
96
+ final Runtime dryRuntime = createRuntime (backend , "--dry-run" );
97
+ dryRuntime .getRunner ().runPickle (createPickleEventMatchingStepDefinitions (asList (stepDefinition ), dryRuntime ));
98
+ verify (stepDefinition , never ()).execute (Matchers .anyString (), Matchers .<Object []>any ());
103
99
}
104
100
105
101
@ Test
0 commit comments