Skip to content

Commit

Permalink
Adds ambiguous tests with guess mode scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
GloriaHornero committed Jul 3, 2017
1 parent bedb3d4 commit 97082b2
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions features/docs/defining_steps/ambiguous_steps.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

0 comments on commit 97082b2

Please sign in to comment.