I have a route that works (recognized, can follow it) in a Rails 3 application, but fails in the Cucumber test:
routes.rb:
resources :tests do
member do
post 'start'
end
end
Working link in application:
=button_to 'Start', start_test_path(@test)
Gherkin step:
And I am on the test start page for "Sample Test"
Failing in paths.rb
when /the test start page for "([^\"]*)"/
start_test_path(Test.find_by_name($1))
...
(::) failed steps (::)
No route matches "/tests/1/start" (ActionController::RoutingError)
<internal:prelude>:10:in `synchronize'
./features/step_definitions/web_steps.rb:30:in `/^(?:|I )am on (.+)$/'
features/test_workflow.feature:24:in `And I am on the test start page for "Sample Test"'
Any ideas? Thanks!