That was it! Thanks, Rick!<br><br>Sorry about not posting the failure. DOH! Thanks again, everyone!<br><br>-Corey<br><br><div class="gmail_quote">On Jan 14, 2008 9:38 PM, Rick DeNatale &lt;<a href="mailto:rick.denatale@gmail.com">
rick.denatale@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On 1/14/08, Corey Haines &lt;<a href="mailto:coreyhaines@gmail.com">
coreyhaines@gmail.com</a>&gt; wrote:<br>&gt; Hi, all!<br>&gt;<br>&gt; I would love if someone could help me figure this out. I can&#39;t seem to see<br>&gt; why the following fails:<br>&gt;<br>&gt; Here&#39;s the spec:<br>
&gt; &nbsp; it &quot;should redirect back to the index page&quot; do<br>&gt; &nbsp; &nbsp; Coupon.should_receive<br>&gt; (:new).with({&quot;name&quot;=&gt;@expectedName,&quot;amount&quot;=&gt;@expectedAmount}).and_return(@coupon)<br>&gt; &nbsp; &nbsp; @
coupon.should_receive(:save)<br>&gt; &nbsp; &nbsp; response.should redirect_to(:action =&gt; &#39;index&#39;)<br>&gt; &nbsp; &nbsp; post<br>&gt; &#39;save_coupon&#39;,{:coupon=&gt;{:name=&gt;@expectedName,:amount=&gt;@expectedAmount}}<br><br>
</div>I think you need to check the response after the post, not before.<br><font color="#888888"><br>--<br>Rick DeNatale<br><br>My blog on Ruby<br><a href="http://talklikeaduck.denhaven2.com/" target="_blank">http://talklikeaduck.denhaven2.com/
</a><br>_______________________________________________<br></font><div><div></div><div class="Wj3C7c">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></div></div></blockquote></div><br><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