I get an unsuccessful test, which is being debugged with great difficulty.
My test case:
it "routes to #active" do get ("/parties/active").should route_to("parties#active") end
My route:
resources :parties do get 'active', :on => :collection end
When I run the test case, I get the following error:
NoMethodError: undefined method `values' for "/parties/active":String
Full error output: https://gist.github.com/1748264
When I start the rake routes, I see:
active_parties GET /parties/active(.:format) parties#active parties GET /parties(.:format) parties#index POST /parties(.:format) parties#create new_party GET /parties/new(.:format) parties#new edit_party GET /parties/:id/edit(.:format) parties#edit party GET /parties/:id(.:format) parties
The test that I run is almost identical to the test for the new one created by scaffolding:
it "routes to #new" do get("/parties/new").should route_to("parties#new") end
Any idea what is going on?
source share