Created
August 4, 2009 22:28
-
-
Save thoughtbot/162334 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "when signed out" do | |
setup { sign_out } | |
context "on get to new" do | |
setup { get :new } | |
should_deny_access | |
end | |
end | |
context "when signed in" do | |
setup { sign_in } | |
context "on get to new" do | |
setup { get :new } | |
... | |
end | |
end | |
context "when signed in as an admin" do | |
setup { sign_in_as Factory(:admin_user) } | |
context "on delete to destroy" do | |
setup { delete :destroy } | |
... | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment