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,<div><br></div><div>Zach <br>
<br><div class="gmail_quote">On Thu, Jun 5, 2008 at 1:33 AM, Mikel Lindsaar <<a href="mailto:raasdnil@gmail.com">raasdnil@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Getting a strange error.<div><br></div><div>In a story I have the following step:</div><div><br></div><div>When "I submit a search name" do</div><div> xhr :post, '/searches', {:search => {:given_name => "bob", :family_name => "smith"}}</div>
<div>end</div><div><br></div><div>I am getting:</div><div><br></div><div>ArgumentError: wrong number of arguments (4 for 3)</div><div>stories/searching_story_spec.rb:45 in "I submit a search name"</div><div><br>
</div><div>But I only have 3 arguments in the above list, a symbol, a string and a hash.</div><div><br></div><div>No exception comes up in the test.log</div><div><br></div><div>I am on Rspec trunk from a couple of days ago and Rails 2.1.</div>
<div><br></div><div>Any ideas?</div><div><br></div><font color="#888888"><div>Mikel</div><div><br></div>
</font><br>_______________________________________________<br>
rspec-users mailing list<br>
<a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/rspec-users" target="_blank">http://rubyforge.org/mailman/listinfo/rspec-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Zach Dennis<br><a href="http://www.continuousthinking.com">http://www.continuousthinking.com</a>
</div>