Testing AJAX-intensive Rails application with RSpec
I'm writing a very AJAX-intensive application using Rails 3.0.4, and testing it with RSpec. Most of my controller actions just respond to a "js" format, ie:
respond_to do |format|
f.js
end
and other respond to json. I found how to JSON outp开发者_JAVA百科ut, but I'm not really sure how to test the javascript output from the other actions.
Any ideas? Thanks!
I'd checkout Selenium to handle testing of javascript/ajax functionality of your website.
Checkout this popular slideshow on testing Rails apps with Selenium.
精彩评论