rspec doesn't see fields dynamically added or removed by cocoon in nested form
问题 In my application in Rails 4, I use Cocoon to have nested forms. It works well in the browser, but I want to add some tests with rspec. If I make a click_link("add") (or 'remove') in my test, rspec doesn't see any modification (I print page.body before and after). I also tried with a sleep(10) but it's the same. How could I test if the action (add or remove a nested form) works well ? Thanks EDIT: The scenario to test : scenario "nested form" do user_sign_in contact = FactoryGirl.create(