Sha256: 3d0a286ad1ce1c300f2c38a7cb67665721098fd7b05b5b79f76baf93cb3e3361
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
When /^I visit the front page$/ do visit '/' end When /^I submit a valid form$/ do fill_all_with_valid_data click_button end When /^I submit a valid form with (.+)$/ do |input| fill_all_with_valid_data values = case input when "decimals" then [ "1000.00", "5000.00", "2000.00" ] when "numbers only" then [ "1000", "5000", "2000" ] when "dollar signs" then [ "$1000.00", "$5000.00", "$2000.00" ] end fill_in "user[savings]", :with => values.pop fill_in "user[income]", :with => values.pop fill_in "user[bills]", :with => values.pop click_button end When /^submit an invalid (.+)$/ do |field| fill_all_with_valid_data fill_in "user[#{field.split.first}]", :with => "invalid" click_button end When /^submit an empty (.+)$/ do |field| fill_all_with_valid_data case field when 'tos' uncheck "user[#{field}]" else fill_in "user[#{field.split.first}]", :with => "" end click_button end When /^the background job runs$/ do visit '/cron' end When /^output the email$/ do puts current_email.body end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sum-0.1.2 | features/step_definitions/when.rb |