Skip to content

Instantly share code, notes, and snippets.

@sritchie
Created June 16, 2010 22:49
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 sritchie/441393 to your computer and use it in GitHub Desktop.
Save sritchie/441393 to your computer and use it in GitHub Desktop.
def login_as(user)
session[:user_id] = users(user).id
end
def logout
sessions.delete :user_id
end
def setup
login_as :one if defined? session
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment