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 output, 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With