<br><br><div><span class="gmail_quote">On 7/6/07, <b class="gmail_sendername">David Chelimsky</b> &lt;<a href="mailto:dchelimsky@gmail.com">dchelimsky@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;">
On 7/5/07, Daniel N &lt;<a href="mailto:has.sox@gmail.com">has.sox@gmail.com</a>&gt; wrote:<br>&gt; Hi,<br>&gt;<br>&gt; I&#39;m very new to rspec so please be patient with me.<br>&gt;<br>&gt; I&#39;ve tried to take some of my tests out of the controller specs to check for
<br>&gt; things that are rendered.<br>&gt;<br>&gt; This has not worked so well, since my views have the controller method<br>&gt;<br>&gt; current_user<br>&gt;<br>&gt; in quite a few places.<br>&gt;<br>&gt; Is there any way that I can define this so that my views will be executed?
<br>&gt; Will this same thing occur for all helper methods that are definied in the<br>&gt; controller?<br><br>If I understand you correctly, you are trying to take tests for views<br>that were previously rails functional tests and turn them into rspec
<br>view examples. If that is the case, you should be able to do this:<br><br>template.stub!(:current_user).and_return(mock_model(User))<br><br>If not, please provide an explicit example so we can better understand<br>what you&#39;re talking about.
<br><br>Cheers,<br>David</blockquote><div><br><br>Thanx David,&nbsp; <br><br>That looks like what I was looking for.&nbsp; <br><br>I will try it when I get home.<br><br>Cheers<br>Daniel<br> </div><br></div><br>