Hi,<br><br>Made a little progress here.&nbsp; In one of my &quot;given&quot; steps I was posting to the login action.&nbsp; when I take this post out (and make other changes required), the should render_template works correctly.&nbsp;&nbsp; It&#39;s as though the earlier post in the given step is meaning that the response isn&#39;t set correctly after the later post..<br>
<br>Tim. <br><br><div><span class="gmail_quote">On 02/04/2008, <b class="gmail_sendername">Tim Haines</b> &lt;<a href="mailto:tmhaines@gmail.com">tmhaines@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi y&#39;all<br><br>The problem is probably because I&#39;m a newb.&nbsp; I have a home controller in the admin namespace.&nbsp; <br><br>My controller spec is working as expected, and the following example is passing:<br><br>&nbsp; it &quot;should show the home page if logged in&quot; do<br>

&nbsp;&nbsp;&nbsp; controller.send(&quot;current_user=&quot;, User.new)<br>&nbsp;&nbsp;&nbsp; get :index<br>&nbsp;&nbsp;&nbsp; response.should render_template(&#39;admin/home/index&#39;)<br>&nbsp; end<br><br><br>But my story is failing on the &quot;then&quot; step:<br><br>

&nbsp;When &quot;I view the home page&quot; do <br>&nbsp;&nbsp;&nbsp; get admin_url<br>&nbsp; end<br><br>&nbsp; Then &quot;I see the home page&quot; do<br>&nbsp;&nbsp;&nbsp; response.should_not be_redirect&nbsp;&nbsp; # this passes<br>&nbsp;&nbsp;&nbsp; response.code.should == &quot;200&quot;&nbsp;&nbsp;&nbsp; # this passes<br>

&nbsp;&nbsp;  <br>&nbsp;&nbsp;&nbsp; response.should have_text(/&quot;Client Administration.&quot;/)&nbsp; #this fails, as response.body is nil<br>&nbsp;&nbsp;&nbsp; response.should render_template(&quot;admin/home/index&quot;)&nbsp; #this fails, with actual being nil.<br>

&nbsp; end<br><br>It&#39;s as though the template isn&#39;t actually being rendered for some reason.&nbsp; Any clues as to why this might be?&nbsp; My login story uses render_template in a similar way and it works successfully..<br><br>

Cheers,<br><span class="sg"><br>Tim.<br>&nbsp;<br>
</span></blockquote></div><br>