I have created a new rails 3.2 app and my cucumber specs are returning this error –
undefined method `path_to' for #<Cucumber::Rails::World:
When running:
When /^(?:|I )go to (.+)$/ do |page_name|
visit path_to(page_name)
end
My bundler looks like this:
- capybara (1.1.2)
- cucumber (1.1.4)
- cucumber-rails (1.2.1)
- database_cleaner (0.7.0)
- factory_girl (2.2.0)
- factory_girl_rails (1.3.0)
- gherkin (2.7.6)
- guard (0.8.8)
- guard-cucumber (0.7.5)
- guard-rspec (0.5.11)
- rails (3.2.1)
- rspec (2.8.0)
- rspec-core (2.8.0)
- rspec-expectations (2.8.0)
- rspec-mocks (2.8.0)
- rspec-rails (2.8.1)
- selenium-webdriver (2.18.0)
- xpath (0.1.4)
Any idea why ? I thought it was capybara but it is uptodate.
If you want to use
path_tomethod from cucumber-rails-training-wheels gem you should add this file to your support folder: https://github.com/cucumber/cucumber-rails-training-wheels/blob/master/lib/generators/cucumber_rails_training_wheels/install/templates/support/paths.rb