Skip to content

Instantly share code, notes, and snippets.

@lifo
Created October 17, 2008 22:44
Show Gist options
  • Save lifo/17554 to your computer and use it in GitHub Desktop.
Save lifo/17554 to your computer and use it in GitHub Desktop.
context "logged out" do
setup { session[:user_id] = nil }
context "GET to index" do
setup { get :index }
should_redirect_to_root
end
context "GET to show" do
setup { get :show }
should_redirect_to_root
end
context "GET to edit" do
setup { get :edit }
should_redirect_to_root
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment