You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

standard_step_actions.rb 470 B

2 years ago
12345678910111213141516171819
  1. # frozen_string_literal: true
  2. # Filter that activates steps with obvious pass / fail behaviour
  3. class StandardStepActions < Cucumber::Core::Filter.new
  4. def test_case(test_case)
  5. test_steps = test_case.test_steps.map do |step|
  6. case step.text
  7. when /fail/
  8. step.with_action { raise Failure }
  9. when /pass/
  10. step.with_action {}
  11. else
  12. step
  13. end
  14. end
  15. test_case.with_steps(test_steps).describe_to(receiver)
  16. end
  17. end

No Description

Contributors (1)