Skip to content

Instantly share code, notes, and snippets.

@laktek
Created February 19, 2009 14:23
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 laktek/66939 to your computer and use it in GitHub Desktop.
Save laktek/66939 to your computer and use it in GitHub Desktop.
Given /^I have logged in as "(.*)"$/ do |name|
business = Business.make(:subdomain => "test")
@current_user = User.make(:email => "#{name}@example.com",
:password => "qaz123",
:password_confirmation => "qaz123",
:business => business)
visit "/login"
fill_in "Email", :with => "#{name}@example.com"
fill_in "Password", :with => "qaz123"
click_button "Sign in"
response.should redirect_to(account_url)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment