I\'m fairly new to RoR and recently started learning BDD/Rspec for testing my application. I\'ve been looking for a way to spec an AJAX request, but so far I haven\'t found
If you're talking about testing it inside your controller specs, where you normally call
get :index
to make an HTTP request to the index action, you would instead call
xhr :get, :index
to make an XmlHttpRequest (AJAX) request to the index action using GET.