Skip to content

Instantly share code, notes, and snippets.

@yulrizka
Created March 18, 2012 09:35
Show Gist options
  • Save yulrizka/2070183 to your computer and use it in GitHub Desktop.
Save yulrizka/2070183 to your computer and use it in GitHub Desktop.
Helper for login in sorcery on request spec
# spec/support/sorcery_helper.rb
module Sorcery
module TestHelpers
module Rails
def login_user_post(user, password)
page.driver.post(sessions_url, { username: user, password: password})
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment