Testing AJAX-intensive Rails application with RSpec

I am writing a very intensive AJAX application using Rails 3.0.4 and testing it with RSpec. Most of my actions with the controller simply respond to the "js" format, that is:

respond_to do |format|
  f.js
end

and others are json. I found how JSON output, but I'm not quite sure how to check javascript output from other actions.

Any ideas? Thank you

+5
source share
1 answer

I would check Selenium to handle testing the javascript / ajax functionality of your site.

Checkout is a popular slideshow for testing Rails applications with Selenium.

+4

All Articles