我有问题:
When I follow "Find Movies With Same Director" #
features/step_definitions/web_steps.rb:56
Unable to find link "Find Movies With Same Director" (Capybara::ElementNotFound)
在 web_steps.rb 中:
When /^(?:|I )follow "([^"]*)"$/ do |link|
click_link(link)
end
在我的路线中:
find_movies_with_same_director_movie GET /movies/:id/find_movies_with_same_director(.:format) {:action=>"find_movies_with_same_director", :controller=>"movies"}
movies GET /movies(.:format)
在我看来show.html.haml:
%br
= link_to 'Find Movies With Same Director', find_movies_with_same_director_movie_path(@movie)
在控制器 movies_controller.rb 中:
def find_movies_with_same_director
# some code
end
怎么了?