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
For Rails 4, in case somebody gets to this question without being limited to Rails 3.
select '2020', from: 'field_name_{}_1i' select 'January', from: 'field_name_{}_2i' select '1', from: 'field_name_{}_3i'
You can of course extract this to a helper and make it dynamic.