I am trying out the cucumber tutorial
My tasklist.feature file is like as follows
In order to keep track of tasks
People should be able to
Create a list of tasks
Scenario: List Tasks
Given that I have created a task "task 1"
When I go to the tasks page
Then I should see "task 1"
My tasklist_steps.rb file is as follows:-
Given /^that I have created a task "(.*)"$/ do |desc|
Task.create!(:description => desc)
When /^I go to the tasks page$/ do
Whenever I am doing "rake cucumber:all" I am getting following error:-
(: failed steps (:
Ambiguous match of "I go to the tasks page":
features/step_definitions/tasklist_steps.rb:5:in `/^I go to the tasks
features/step_definitions/web_steps.rb:19:in `/^(?:|I )go to (.+)$/'
You can run again with --guess to make Cucumber be more smart about it
features/tasklist.feature:8:in `When I go to the tasks page'
cucumber features/tasklist.feature:6 # Scenario: List Tasks
1 scenario (1 failed)
3 steps (1 failed, 1 skipped, 1 passed)
Command failed with status (1): [/usr/local/ruby2/bin/ruby -I
(See full trace by running task with --trace)
Can anyone tell me what is the wrong with my test code?