Permalink
Browse files

Use symbols for multi-action tests in ProjectsController

  • Loading branch information...
1 parent cb35a26 commit b67926f088b5dfa37cb2b9c04f0c72074d914cd3 @radar radar committed Aug 6, 2012
Showing with 6 additions and 7 deletions.
  1. +6 −7 spec/controllers/projects_controller_spec.rb
@@ -10,15 +10,14 @@
sign_in(:user, user)
end
-
- { "new" => "get",
- "create" => "post",
- "edit" => "get",
- "update" => "put",
- "destroy" => "delete" }.each do |action, method|
+ { :new => :get,
+ :create => :post,
+ :edit => :get,
+ :update => :put,
+ :destroy => :delete }.each do |action, method|
it "cannot access the #{action} action" do
sign_in(:user, user)
- send(method, action.dup, :id => project.id)
+ send(method, action, :id => project.id)
response.should redirect_to(root_path)
flash[:alert].should eql("You must be an admin to do that.")
end

0 comments on commit b67926f

Please sign in to comment.