<html><body bgcolor="#FFFFFF"><div>Just a "puts response.body" or the equivalent for webrat should be sufficient in your test (before the assertion). </div><div><br></div><div>I suspect Matthews diagnosis is correct, I've been caught by it myself in the past. </div><div><br></div><div>Glenn<br><br>- Mistyped in a rush on my mobile</div><div><br>On 27 Jul 2010, at 10:09, Riccardo Tacconi <<a href="mailto:rtacconi@gmail.com">rtacconi@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>Matthew,<br><br>I have not used a debugger with Ruby yet.<br><br><div class="gmail_quote">On 26 July 2010 18:21, Matthew Rudy Jacobs <span dir="ltr"><<a href="mailto:matthewrudyjacobs@gmail.com"><a href="mailto:matthewrudyjacobs@gmail.com">matthewrudyjacobs@gmail.com</a></a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">have you used debugger?<br>I suggest you see what the content actually looks like<br><br>in particular response.body<br>
<br>perhaps its actually some error page that is being displayed<br>and erroneously returning a 200<br></blockquote><div><br>I think that is the case <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>ie.<br>check what your output is exactly<br>before saying the assertion is broken.<br><br></blockquote><div><br>Yes, I am wondering how to intercept the output to have more info<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
most likely its the code thats broken.<div><div></div><div class="h5"><br><br><div class="gmail_quote">On 26 July 2010 18:17, Riccardo Tacconi <span dir="ltr"><<a href="mailto:rtacconi@gmail.com" target="_blank"><a href="mailto:rtacconi@gmail.com">rtacconi@gmail.com</a></a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I do not know if the test sends Accept text/html but I removed respond_to .html and left only the redirect, so it should redirect for every type of content, but I get the same message.<br>
<br>Thanks,<br><font color="#888888"><br>Riccardo</font><div><div></div><div><br><br>
<div class="gmail_quote">On 26 July 2010 18:08, Tim Cowlishaw <span dir="ltr"><<a href="mailto:tim@timcowlishaw.co.uk" target="_blank"><a href="mailto:tim@timcowlishaw.co.uk">tim@timcowlishaw.co.uk</a></a>></span> 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><br>
On 26 Jul 2010, at 18:05, Riccardo Tacconi wrote:<br>
<br>
><br>
> Expected response to be a <:redirect>, but was <200><br>
><br>
> But why? That method really return a 302 (redirrect) method. Do I miss something?<br>
<br>
</div>does the request that your test sends have an Accepts header of text/html? Since the redirect is within the respond_to html block, I think it would return 200 for any other content types.<br>
<br>
Cheers,<br>
<br>
Tim<br>
_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org" target="_blank"><a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a></a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank"><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a></a><br>
</blockquote></div><br><br clear="all"><br></div></div><div><div></div><div>-- <br>Riccardo Tacconi<br>Web developer at Wolseley UK <br><br><a href="http://www.linkedin.com/in/riccardotacconi" target="_blank"><a href="http://www.linkedin.com/in/riccardotacconi">http://www.linkedin.com/in/riccardotacconi</a></a><br>
<a href="http://riccardotacconi.blogspot.com/" target="_blank"><a href="http://riccardotacconi.blogspot.com/">http://riccardotacconi.blogspot.com/</a></a><br>
<a href="http://twitter.com/rtacconi" target="_blank"><a href="http://twitter.com/rtacconi">http://twitter.com/rtacconi</a></a><br>Linux user: #400461<br>
</div></div><br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org" target="_blank"><a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a></a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank"><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a></a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org"><a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a></a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank"><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a></a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Riccardo Tacconi<br>Web developer at Wolseley UK <br><br><a href="http://www.linkedin.com/in/riccardotacconi"><a href="http://www.linkedin.com/in/riccardotacconi">http://www.linkedin.com/in/riccardotacconi</a></a><br><a href="http://riccardotacconi.blogspot.com/"><a href="http://riccardotacconi.blogspot.com/">http://riccardotacconi.blogspot.com/</a></a><br>
<a href="http://twitter.com/rtacconi"><a href="http://twitter.com/rtacconi">http://twitter.com/rtacconi</a></a><br>Linux user: #400461<br>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Chat mailing list</span><br><span><a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a></span><br><span><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a></span><br></div></blockquote></body></html>