Created
February 17, 2010 17:23
-
-
Save joemsak/306830 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When /^I add a new booking with:$/ do |table| | |
booking_info = table.hashes.first | |
visit new_booking_path | |
booking_info.each do |field, value| | |
if field == 'Start Date' || field == 'End Date' | |
fill_in(field, :with => value) | |
elsif field != 'Contractors' | |
select(value, :from => field) | |
else | |
check(value) | |
end | |
end | |
click_button "Submit" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment