Permalink
Browse files

update for rspec > 1.1.12

  • Loading branch information...
1 parent 2ae4c22 commit ad92c6cb52500c37ef81e30ac4e79adffc2f4d39 @dchelimsky committed Mar 9, 2009
View
4 generators/authenticated/templates/spec/controllers/sessions_controller_spec.rb
@@ -105,10 +105,10 @@ def do_destroy
route_for(:controller => '<%= controller_controller_name %>', :action => 'new').should == "/login"
end
it "should route the create <%= controller_controller_name %> correctly" do
- route_for(:controller => '<%= controller_controller_name %>', :action => 'create').should == "/<%= controller_routing_path %>"
+ route_for(:controller => '<%= controller_controller_name %>', :action => 'create').should == {:path => "/<%= controller_routing_path %>", :method => :post}
end
it "should route the destroy <%= controller_controller_name %> action correctly" do
- route_for(:controller => '<%= controller_controller_name %>', :action => 'destroy').should == "/logout"
+ route_for(:controller => '<%= controller_controller_name %>', :action => 'destroy').should == {:path => "/logout", :method => :delete}
end
end
View
6 generators/authenticated/templates/spec/controllers/users_controller_spec.rb
@@ -105,7 +105,7 @@ def create_<%= file_name %>(options = {})
end
it "should route {:controller => '<%= model_controller_controller_name %>', :action => 'create'} correctly" do
- route_for(:controller => '<%= model_controller_controller_name %>', :action => 'create').should == "/register"
+ route_for(:controller => '<%= model_controller_controller_name %>', :action => 'create').should == {:path => "/register", :method => :post}
end
it "should route <%= model_controller_controller_name %>'s 'show' action correctly" do
@@ -117,11 +117,11 @@ def create_<%= file_name %>(options = {})
end
it "should route <%= model_controller_controller_name %>'s 'update' action correctly" do
- route_for(:controller => '<%= model_controller_controller_name %>', :action => 'update', :id => '1').should == "/<%= model_controller_routing_path %>/1"
+ route_for(:controller => '<%= model_controller_controller_name %>', :action => 'update', :id => '1').should == {:path => "/<%= model_controller_routing_path %>/1", :method => :put}
end
it "should route <%= model_controller_controller_name %>'s 'destroy' action correctly" do
- route_for(:controller => '<%= model_controller_controller_name %>', :action => 'destroy', :id => '1').should == "/<%= model_controller_routing_path %>/1"
+ route_for(:controller => '<%= model_controller_controller_name %>', :action => 'destroy', :id => '1').should == {:path => "/<%= model_controller_routing_path %>/1", :method => :delete}
end
end

0 comments on commit ad92c6c

Please sign in to comment.