Hi,
I have this route configurated in my routes.rb
map.resources :accounts do |account|
account.resources :managers, :controller => 'account_managers'
end
This works.
Now, I want to test the update route in my spec:
I'm doing:
route_for(:controller => 'account_managers', :action => "update",
:account_id => "2", :id => "1").should == {:path =>
"/accounts/2/managers/1", :method => :put}
I'm getting this error:
found extras <{:account_id=>"2"}>, not <{}>
Now... if I remove the "extras" he said:
route_for(:controller => 'account_managers', :action => "update", :id =>
"1").should == {:path => "/accounts/2/managers/1", :method => :put}
I get:
The recognized options <{"controller"=>"account_managers",
"action"=>"update",
"account_id"=>"2",
"id"=>"1"}> did not match <{"controller"=>"account_managers",
"action"=>"update", "id"=>"1"}>, difference: <{"account_id"=>"2"}>
Any idea of what is going on here?
on 2010-08-20 19:43
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.