Skip to content

Instantly share code, notes, and snippets.

@mgreenly
Created November 16, 2011 04:15
Show Gist options
  • Save mgreenly/1369221 to your computer and use it in GitHub Desktop.
Save mgreenly/1369221 to your computer and use it in GitHub Desktop.
Cucumber/RSpec onion layer 2
When /^I submit valid warranty claim details$/ do
@warranty_registration = Factory(:warranty_registration)
visit new_warranty_claim_path
fill_in 'Failure date', :with => Time.now.strftime("%m/%d/%Y")
fill_in 'Serial number', :with => @warranty_registration.serial_number
fill_in 'Customer name', :with => @warranty_registration.full_name
fill_in 'Customer phone', :with => @warranty_registration.phone
click_button "Create"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment