tracks/features/step_definitions/login_steps.rb
Reinier Balt 8f349d3b6b set configurations for using cucumber and selenium
if you want to run it, update your database.yml to include cucumber and selenium environments (like in the .tmpl) and run

RAILS_ENV=selenium cucumber -p selenium
2010-02-02 22:52:32 +01:00

14 lines
488 B
Ruby

Given /^I have logged in as "(.*)" with password "(.*)"$/ do |username, password|
visit login_path
fill_in "Login", :with => username
fill_in "Password", :with => password
click_button
response.should contain(/Login successful/)
@current_user = User.find_by_login(username)
end
When /^I submit the login form as user "([^\"]*)" with password "([^\"]*)"$/ do |username, password|
fill_in 'Login', :with => username
fill_in 'Password', :with => password
click_button
end