Cucumber refactoring

This commit is contained in:
randx 2012-09-06 09:15:51 +03:00
parent 21bfd1e7fc
commit e4447de23f
13 changed files with 163 additions and 119 deletions

View file

@ -0,0 +1,21 @@
include LoginHelpers
Given /^I signin as a user$/ do
login_as :user
end
When /^I click link "(.*?)"$/ do |link|
click_link link
end
When /^I click button "(.*?)"$/ do |button|
click_button button
end
When /^I fill in "(.*?)" with "(.*?)"$/ do |field, value|
fill_in field, :with => value
end
Given /^show me page$/ do
save_and_open_page
end