On Dec 16, 10:23 am, Mike Disuza <li...@ruby-forum.com> wrote: > Hi, > I am trying out the cucumber tutorial > > http://www.ultrasaurus.com/sarahblog/2008/12/rails-2-day-3-behavior-d... > > My tasklist.feature file is like as follows > " > Feature: Tasks > 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) > end > > When /^I go to the tasks page$/ do > visit "/tasks" > end > " > > Whenever I am doing "rake cucumber:all" I am getting following error:- > ".F- > > (::) failed steps (::) > > Ambiguous match of "I go to the tasks page": > > features/step_definitions/tasklist_steps.rb:5:in `/^I go to the tasks > page$/' > 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 > (Cucumber::Ambiguous) > features/tasklist.feature:8:in `When I go to the tasks page' > > Failing Scenarios: > cucumber features/tasklist.feature:6 # Scenario: List Tasks > > 1 scenario (1 failed) > 3 steps (1 failed, 1 skipped, 1 passed) > 0m0.063s > rake aborted! > Command failed with status (1): [/usr/local/ruby2/bin/ruby -I > "/usr/local/r...] > > (See full trace by running task with --trace) > " > > Can anyone tell me what is the wrong with my test code? > You have defined step in the tasklist_steps.rb and same step is already defined in web_steps.rb during: rails cucumber:install
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.