I am working with rails 3 and cucumber, all is going well except for this little problem
Given I am on the "edit automobile" page
No route matches {:controller=>"automobiles", :action=>"edit"} (ActionController::RoutingError)
Now the path is set in paths.rb as edit_automobile_path
and in the routes.rb I have automobiles as a resource, I scaffolded it
so please tell me what I am missing, clearly the route is defined and matches, because I ran rake routes and saw the route.
please point me in the right direction
In your
features/support/paths.rbfile for a path like this that specifies a unique resource you need to pass youredit_automobile_pathan id,in your rake routes it will look like
automobiles/:id/editso you need to have
edit_automobile_path(:id)In order to do this in cucumber assume you have something like
In your given step def declare a variable
@automobile = Automobile.create()And then in your paths.rb file