I'm with a problem here. There are two select on view and there is an onchange
on the first. When the user changes the first select, the second is reloaded via ajax. It is working as well.
My problem is write that in capybara.
select all('#unit_id option').last.text, from: 'unit_id'
select all('#places_options option').last.text, from: 'places_options'
Unit reloads Place, but it is not happening on specs. I had already created the unit and place for created unit. The first command is working perfectly, but the ajax is not running and therefore places is empty.