Can somebody give advice, how to test AJAX in Ruby on Rails?
For example: i click to button, query going to TestController#new, and in that method we have respond_with(@test) and new.js.erb, where is html form. Ok, i can click_to this link/button, xhr query will work, but i don’t get any responses, which i need to test.
Can some body help with this, please?
I’m using Rspec.
You should use Capybara and Selenium. Look at this great Railscast.