开发者

Testing AJAX-intensive Rails application with RSpec

开发者 https://www.devze.com 2023-02-18 09:55 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号