If you use Capybara, a couple of useful notes, based on what I learned implementing js-enabled &headless specs for my SaaS [3]:
First, using the poltergeist driver [1] which is PhantomJS based will tend to be faster AND raise errors when a javascript error occurs (unlike capybara-webkit), which is really handy if your app has a bit of javascript.
Also, you can inject puffing-billy [2] into the mix: this is a proxy that will allow you to mock XHR queries without touching the javascript libraries. This allows to write full integration specs for scenarios involving libraries like Stripe/Recurly.js etc, but using mocked calls.
[1] https://github.com/teampoltergeist/poltergeist