Hi, all!<br><br>I would love if someone could help me figure this out. I can&#39;t seem to see why the following fails:<br><br>Here&#39;s the spec:<br>&nbsp; it &quot;should redirect back to the index page&quot; do<br>&nbsp;&nbsp;&nbsp; Coupon.should_receive
(:new).with({&quot;name&quot;=&gt;@expectedName,&quot;amount&quot;=&gt;@expectedAmount}).and_return(@coupon)<br>&nbsp;&nbsp;&nbsp; @coupon.should_receive(:save)<br>&nbsp;&nbsp;&nbsp; response.should redirect_to(:action =&gt; &#39;index&#39;)<br>&nbsp;&nbsp;&nbsp; post &#39;save_coupon&#39;,{:coupon=&gt;{:name=&gt;@expectedName,:amount=&gt;@expectedAmount}}
<br>&nbsp; end<br><br>(the @vars are all set up)<br><br>Here&#39;s the method:<br>&nbsp; def save_coupon<br>&nbsp;&nbsp;&nbsp; @coupon = Coupon.new(params[:coupon])<br>&nbsp;&nbsp;&nbsp; @coupon.save<br>&nbsp;&nbsp;&nbsp; redirect_to :action =&gt; :index<br>&nbsp; end<br><br>Now, I&#39;ve tried it through the browser, and it works. Any thoughts?
<br><br>I appreciate it.<br>-Corey<br clear="all"><br>-- <br><a href="http://www.coreyhaines.com">http://www.coreyhaines.com</a><br>The Internet&#39;s Premiere source of information about Corey Haines