restful_authentication and rspec-rails 1.2.2
March 26th 2009If you are getting something like this:
it "should map #edit" do
- route_for(:controller => "assets", :action => "edit", :id => 1).should == "/assets/1/edit"
+ route_for(:controller => "assets", :action => "edit", :id => "1").should == "/assets/1/edit"
end
it "should map #update" do
- route_for(:controller => "assets", :action => "update", :id => 1).should == "/assets/1"
+ route_for(:controller => "assets", :action => "update", :id => "1").should == {:path => "/assets/1", :method => :put}
end
Essentially you need to change your == match to be a hash which includes a :method key. Also, numbers for the :id param should be quoted.
This will probably be fixed on the restful_authentication side since David Chelimsky has posted a patch on github (thanks David!). But, if you created these specs with the restful_authentication generator you may want to just go in and change them yourself. Onward!