If you want a true integration test, you can use Capybara with a driver that executes javascript, like Poltergeist, or Capybara-Webkit. Alternatively, you could use Selenium, but that's not quite as slick as a headless test.
That said, you will probably have a lot more luck and more solid tests if you test your front end and back end separately with Rspec on the back and Jasmine/Qunit on the front. Integration tests with JS are often tricky.