Sha256: adcabb4dfd636594afb63a84130059741f12fc245f2fd2a678c158cae07f7d5d

Contents?: true

Size: 454 Bytes

Versions: 6

Compression:

Stored size: 454 Bytes

Contents

module Cucumber
  class Runtime
    class StepHooks
      def initialize(after)
        @after = after
      end

      def apply(test_steps)
        test_steps.flat_map do |test_step|
          [test_step] + after_step_hooks(test_step)
        end
      end

      private
      def after_step_hooks(test_step)
        @after.map do |action_block|
          Hooks.after_step_hook(test_step.source, &action_block)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cucumber-2.0.0 lib/cucumber/runtime/step_hooks.rb
cucumber-2.0.0.rc.5 lib/cucumber/runtime/step_hooks.rb
cucumber-2.0.0.rc.4 lib/cucumber/runtime/step_hooks.rb
cucumber-2.0.0.rc.3 lib/cucumber/runtime/step_hooks.rb
cucumber-2.0.0.rc.2 lib/cucumber/runtime/step_hooks.rb
cucumber-2.0.0.rc.1 lib/cucumber/runtime/step_hooks.rb