I\'m writing a spec for a controller in Rails 3 project using RSpec and Capybara, and I want to select current date from a select box. I tried:
select Date.t
Given the following Formtastic code renders Rails default date selector:
= f.input :born_on, end_year: Time.now.year, start_year: 60.years.ago.year
In your spec, break the date into separate calls to each individual select tag:
select '1956', from: 'person_born_on_1i'
select 'July', from: 'person_born_on_2i'
select '9', from: 'person_born_on_3i'
I don't like that this code is so aware of the HTML, but it does work with the versions of gems at this time.
Gems: