Sha256: c79529331c76d4adc29c3874321fa6cbe4747d17e390c65966c2e5921c2ee90d

Contents?: true

Size: 440 Bytes

Versions: 11

Compression:

Stored size: 440 Bytes

Contents

# Filter that activates steps with obvious pass / fail behaviour
class StandardStepActions < Cucumber::Core::Filter.new
  def test_case(test_case)
    test_steps = test_case.test_steps.map do |step|
      case step.name
      when /fail/
        step.with_action { raise Failure }
      when /pass/
        step.with_action {}
      else
        step
      end
    end

    test_case.with_steps(test_steps).describe_to(receiver)
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
cucumber-2.99.0 spec/support/standard_step_actions.rb
mobiusloop-0.1.5 spec/support/standard_step_actions.rb
cucumber-2.4.0 spec/support/standard_step_actions.rb
mobiusloop-0.1.3 spec/support/standard_step_actions.rb
mobiusloop-0.1.2 spec/support/standard_step_actions.rb
cucumber-2.3.3 spec/support/standard_step_actions.rb
cucumber-2.3.2 spec/support/standard_step_actions.rb
cucumber-2.3.1 spec/support/standard_step_actions.rb
cucumber-2.3.0 spec/support/standard_step_actions.rb
cucumber-2.2.0 spec/support/standard_step_actions.rb
cucumber-2.1.0 spec/support/standard_step_actions.rb