Permalink
Browse files

show how to check the authorisation without a macro

  • Loading branch information...
1 parent 03d5329 commit ac8d4f9ae00738c4fa17c4314ba459572db2a347 @dnagir committed Apr 19, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 README.md
View
@@ -245,6 +245,11 @@ describe PagesController do
should_authorize_for(:create, page)
post(:create)
end
+
+ it "checks the authorisation with plain RSpec if you don't like the macro" do
+ allowy.should_receive(:authorize!).with(:create, page)
+ post(:create)
+ end
end
```

0 comments on commit ac8d4f9

Please sign in to comment.