Wait for Javascript and AJAX changes in Capybara : ruby
http://www.reddit.com/r/ruby/comments/2r4ugn/wait_for_javascript_and_ajax_changes_in_capybara/
I've ran into a handful of things capybara doesn't automatically wait for, and had to roll my own waitloops. The names should be pretty self explanatory.