Skip to content

Instantly share code, notes, and snippets.

@abuiles
Created July 7, 2010 19:58
Show Gist options
  • Save abuiles/467187 to your computer and use it in GitHub Desktop.
Save abuiles/467187 to your computer and use it in GitHub Desktop.
def account
@account ||= Factory.build(:account)
end
Given /^I have a valid account$/ do
account
end
Then /^I should visit the login page$/ do
visit path_to("the homepage")
click_link "login"
end
When /^I login$/ do
fill_in('Email', :with=> account.email)
fill_in('Password', :with=>'password')
# Then %Q{show me the page}
click_button("Log In")
end
Then /^I should "([^"]*)"$/ do |arg1|
response.should contain(arg1)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment