Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
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
Then /^the selected date for "([^"]*)" should be "([^"]*)"$/ do |field, date| | |
field = field.tr('[', '_') | |
field = field.tr(']', '_') | |
year_field = field + '1i' | |
month_field = field + '2i' | |
day_field = field + '3i' | |
date = Date.parse(date) | |
field_with_id(year_field).element.search(".//option[@selected = 'selected']").inner_html.should =~ /#{date.year}/ |
NewerOlder