On 23-okt-2005, at 22:00, Raphael Bauduin wrote:
> Hi,
>
> how can I set the correct headers on the @request variable in a uni
> test method, so that it considers the request to be a xhr? I know
> this:
> http://api.rubyonrails.com/classes/ActionController/
> AbstractRequest.html#M000142
>
> but don''t know how to set it in my tests.
>
Use xhr :get, :action, :params=>{...} instead of get :action
Note that you have to use the latest Rails version, because the
header does not get reset between calls
>
--
Julian "Julik" Tarkhanov