If your controller action looks like this:
respond_to do |format| format.html { raise \'Unsupported\' } format.js # index.js.erb end
and yo
Set the accepted content type to the type you want:
@request.accept = "text/javascript"
Combine this with your get :index test and it will make the appropriate call to the controller.
get :index