photomix/features/step_definitions/user_steps.rb
2009-06-04 22:28:28 +02:00

13 lines
No EOL
354 B
Ruby

Given /^I am logged in as "([^\"]*)" with password "([^\"]*)"$/ do |email, password|
unless email.blank?
visit login_url
fill_in "Email", :with => email
fill_in "Password", :with => password
click_button "Login"
end
end
When /^I visit profile for "([^\"]*)"$/ do |email|
user = User.find_by_email!(email)
visit user_url(user)
end