Skip to content

Instantly share code, notes, and snippets.

@whitneyimura
Created October 15, 2013 02:25
Show Gist options
  • Save whitneyimura/6985610 to your computer and use it in GitHub Desktop.
Save whitneyimura/6985610 to your computer and use it in GitHub Desktop.
Sample Step definitions for login
require File.join(File.dirname(__FILE__), '..', '..', 'lib', 'pages', 'HomePage')
And /^I click login$/ do
@page.header.click_login
end
And /^I enter ([A-za-z0-9.@]+)$/ do |email|
@email = email
end
And /^password as (w+)$/ do |password|
@password = password
end
When /^I attempt to login$/ do
@page.header.login(@email, @password)
end
Then /^the login should (w+)$/ do |result|
@page.header.login_result_is(result)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment