Skip to content

Commit

Permalink
Changed specs regarding action_methods to ones compatible with Rails …
Browse files Browse the repository at this point in the history
…2.1 & rspec
  • Loading branch information
ianwhite committed Feb 3, 2009
1 parent 80bf48d commit 0d85268
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions spec/controllers/forums_controller_spec.rb
Expand Up @@ -146,9 +146,7 @@

describe ForumsController, " (checking that non actions are hidden)" do
it "should only have CRUD actions as action_methods" do
@controller.class.send(:action_methods).should == Set.new([
'index', 'show', 'edit', 'new', 'update', 'create', 'destroy'
])
(@controller.class.send(:action_methods) & Set.new(['resource', 'resources'])).should be_empty
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/infos_controller_spec.rb
Expand Up @@ -37,8 +37,8 @@ def setup_mocks
setup_mocks
end

it "should have only ['show', 'edit', 'update'] in action_methods" do
@controller.class.send(:action_methods).should == Set.new(['show', 'edit', 'update'])
it "should not have ['new', 'index', 'destroy', 'create'] in action_methods" do
(@controller.class.send(:action_methods) & Set.new(['new', 'index', 'destroy', 'create'])).should be_empty
end

it "GET /account/info should be successful" do
Expand Down

0 comments on commit 0d85268

Please sign in to comment.