title: Testing JavaScript create through AJAX in Rails App
body: <p>I am developing an eCommerce gem with Rails. I am trying to keep as much of the code in the app as possible. I want to make updates to, say, the shopping cart through Ajax, and then return data and an event back to allow the view to be noted in the view. </p>
  
  <p>I am looking for a way to determine what becomes available to my JavaScript when and Ajax call is returned. I want to track the event, and so forth. </p>
  
  <p>I am looking more for advice here than an answer, but what kind of testing framework are developers generally using for this? </p>
  
  <p>I use RSpec, Capybara, and FactoryGirl for unit, request, and controller testing currently. </p>