diff --git a/features/docs/defining_steps/ambiguous_steps.feature b/features/docs/defining_steps/ambiguous_steps.feature index fd85b2d5a1..c6c582e954 100644 --- a/features/docs/defining_steps/ambiguous_steps.feature +++ b/features/docs/defining_steps/ambiguous_steps.feature @@ -70,3 +70,39 @@ Feature: Ambiguous Steps 4 steps (1 failed, 3 passed) 0m0.012s """ + + + Scenario: Ambiguous steps with guess mode + + Given a file named "features/ambiguous.feature" with: + """ + Feature: + + Scenario: + * a step + * an ambiguous step + """ + And a file named "features/step_definitions.rb" with: + """ + When(/^a.*step$/) do + 'foo' + end + + When(/^an ambiguous step$/) do + 'bar' + end + """ + When I run `cucumber -g` + Then it should pass with exactly: + """ + Feature: + + Scenario: # features/ambiguous.feature:3 + * a step # features/step_definitions.rb:1 + * an ambiguous step # features/step_definitions.rb:5 + + 1 scenario (1 passed) + 2 steps (2 passed) + 0m0.012s + + """ \ No newline at end of file