Skip to content

Instantly share code, notes, and snippets.

@daniel-g
Created August 17, 2012 16:57
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 daniel-g/3380573 to your computer and use it in GitHub Desktop.
Save daniel-g/3380573 to your computer and use it in GitHub Desktop.
Stub sign in for warden
def stub_sign_in(user)
request.env['warden'].stub :authenticate! => user
controller.stub(:current_user){ user }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment