Skip to content

Instantly share code, notes, and snippets.

@thiagoramos23
Created November 8, 2014 03:44
Show Gist options
  • Select an option

  • Save thiagoramos23/1daa683fa7e5eb5c3b49 to your computer and use it in GitHub Desktop.

Select an option

Save thiagoramos23/1daa683fa7e5eb5c3b49 to your computer and use it in GitHub Desktop.
login_page_object
class LoginPageObject < BaseObject
def visit_root
visit '/'
self
end
def login(user)
fill_in I18n.t('activerecord.attributes.user.email'), with: user.email
fill_in I18n.t('activerecord.attributes.user.password'), with: user.password
click_on I18n.t('devise.links.sign_in')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment