Skip to content

Instantly share code, notes, and snippets.

@markoa
Created January 5, 2011 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markoa/371356ba0a19666fd3b5 to your computer and use it in GitHub Desktop.
Save markoa/371356ba0a19666fd3b5 to your computer and use it in GitHub Desktop.
describe UsersController do
let(:user) { mock_model(User).as_null_object }
describe "GET new" do
context "when user is logged in" do
it "redirects to the profile page" do
@request.cookies[:lastfm_username] = "rj"
get :new
response.should redirect_to(:action => "show", :lastfm_username => "rj")
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment