Мой файл функций:
Feature: home page links
Background: I am on the home page
Given I am on the home page
Scenario: I visit the about page
When I follow "About"
Then I should be on the about page
В моем paths.rb у меня есть
when /the home\s?page/ then root_path
и рейк-маршруты дают:
root /(.:format) {:controller=>"home", :action=>"home"}
Когда я пытаюсь запустить «bundle exec cucumber», я получаю сообщение:
undefined local variable or method `controller' for #<HomeController:0xb29583c> (ActionView::Template::Error)
<a lot of crap>
./features/step_definitions/web_steps.rb:16:in `/^(?:|I )am on (.+)$/'
features/home_page.feature:4:in `Given I am on the home page'
Failing Scenarios:
cucumber features/home_page.feature:6 # Scenario: I visit the about page
Это тривиальный тест, но я не знаю, с чего начать расследование этого сбоя. Есть идеи? Спасибо.
Кроме того, мой Gemfile:
source :rubygems
gem "rails", "~>3.0"
gem "haml", "~>3.0"
group :test do
gem 'cucumber'
gem 'cucumber-rails'
gem 'nokogiri'
gem 'webrat'
end
group :development do
gem "rspec-rails", "~>2.0.pre"
gem "heroku"
gem "will_paginate", "~>3.0.pre2"
end