Send XHR requests in Rspec controller tests

Posted . Visible to the public.

You can send xhr requests in your rspec tests by using xhr instead of get or post followed by a symbol of the submission method like this: xhr :get, :index, :id = 10

Jonathan Knapp
Last edit
Posted by Jonathan Knapp to Knowledge is Power! (2012-03-22 18:57)