[rspec-users] xhr :post giving wrong number of arguments on rails 2.1?

Zach Dennis zach.dennis at gmail.com
Thu Jun 5 11:39:07 EDT 2008


Use xml_http_request in your stories rather than xhr. I believe the "xhr"
method is aliased to the wrong method... I haven't looked to see if this is
a Rails issue or a rspec-rails issue,
Zach

On Thu, Jun 5, 2008 at 1:33 AM, Mikel Lindsaar <raasdnil at gmail.com> wrote:

> Getting a strange error.
> In a story I have the following step:
>
> When "I submit a search name" do
>   xhr :post, '/searches', {:search => {:given_name => "bob", :family_name
> => "smith"}}
> end
>
> I am getting:
>
> ArgumentError: wrong number of arguments (4 for 3)
> stories/searching_story_spec.rb:45 in "I submit a search name"
>
> But I only have 3 arguments in the above list, a symbol, a string and a
> hash.
>
> No exception comes up in the test.log
>
> I am on Rspec trunk from a couple of days ago and Rails 2.1.
>
> Any ideas?
>
> Mikel
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>



-- 
Zach Dennis
http://www.continuousthinking.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080605/f9badd1d/attachment-0001.html>


More information about the rspec-users mailing list