lib/gurke/step.rb in gurke-3.3.5 vs lib/gurke/step.rb in gurke-3.4.0

- old
+ new

@@ -44,22 +44,21 @@ # @api private # def run(runner, reporter, scenario, world) reporter.invoke :before_step, self, scenario - result = runner.hook(:step, self, world) do - run_step runner, reporter, scenario, world + run_step(runner, reporter, scenario, world).tap do |result| + reporter.invoke :after_step, result, scenario end - - reporter.invoke :after_step, result, scenario end private def run_step(runner, reporter, scenario, world) - reporter.invoke :start_step, self, scenario - - result = find_and_run_step runner, scenario, world + result = runner.hook(:step, self, world) do + reporter.invoke :start_step, self, scenario + find_and_run_step runner, scenario, world + end rescue Interrupt scenario.abort! result = StepResult.new self, scenario, :aborted raise rescue StepPending => e