Sorry about that.&nbsp; Here goes...<br><br>Spec:<br><br><i>describe &quot;/search/index&quot; do  <br>&nbsp; it &quot;should have option to login&quot; do<br>&nbsp;&nbsp;&nbsp; render &quot;/search/index&quot;<br>&nbsp;&nbsp;&nbsp; response.should have_text(/Login/)<br>
&nbsp; end<br>end</i><br><br>Code for index.rhtml<br><br><i>&lt;body&gt;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div id=&quot;container&quot;&gt;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div id=&quot;main_footer&quot; align=&quot;center&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;%= render_component :controller =&gt; &quot;components&quot;, :action =&gt; &quot;footer&quot;, :params =&gt; { :lang =&gt; @language } %&gt;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>&lt;/body&gt;</i><br><br>Code for footer.rhtml<br><br><i>&lt;% listOfParameters = &quot;&quot; %&gt;<br>&lt;% request.params.each do |param| %&gt;<br>&nbsp;&nbsp;&nbsp; &lt;% if param[0].to_s != &quot;lang&quot; %&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;% listOfParameters = listOfParameters + &quot;&amp;&quot; + param[0].to_s + &quot;=&quot; + param[1].to_s %&gt;<br>&nbsp;&nbsp;&nbsp; &lt;% end %&gt;<br>&lt;% end %&gt;<br><br>...</i><br><br>Now the error message:<br><br><i>ActionView::TemplateError in &#39;/search/index should have option to login&#39;<br>
undefined method &#39;params&#39; for #&lt;ActionController::TestRequest:0x46a044c&gt;<br>On line #7 of app/views/components/footer.rhtml<br><br></i><i>6: &lt;% listOfParameters = &quot;&quot; %&gt;<br>7: &lt;% request.params.each do |param| %&gt;<br>
8:&nbsp; &nbsp;&nbsp; &lt;% if param[0].to_s != &quot;lang&quot; %&gt;<br>9: &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &lt;% listOfParameters = listOfParameters + &quot;&amp;&quot; + param[0].to_s + &quot;=&quot; + param[1].to_s %&gt;<br>10:&nbsp; &nbsp;&nbsp; &lt;% end %&gt;<br>11: &lt;% end %&gt;<br>
<br><br></i>Thanks again<br><br>Olivier Dupuis<br><br><br><div class="gmail_quote">On Fri, Apr 11, 2008 at 3:26 PM, David Chelimsky &lt;<a href="mailto:dchelimsky@gmail.com">dchelimsky@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;">
Please post spec, code and error message.<br>
<div><div></div><div class="Wj3C7c"><br>
On Apr 11, 2008, at 3:21 PM, Olivier Dupuis wrote:<br>
<br>
&gt; Hello,<br>
&gt;<br>
&gt; I have a rhtml file that goes through the request.params. &nbsp;One of my<br>
&gt; test generates that file, but rspec pops an error saying :<br>
&gt;<br>
&gt; undefined method &#39;params&#39; for ...<br>
&gt;<br>
&gt; I&#39;m not sure what to do with this, since request.params actually<br>
&gt; works with rails.<br>
&gt;<br>
&gt; Any idea?<br>
&gt;<br>
&gt; Thank you<br>
&gt;<br>
&gt; Olivier Dupuis<br>
</div></div>&gt; _______________________________________________<br>
&gt; rspec-users mailing list<br>
&gt; <a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br>
&gt; <a href="http://rubyforge.org/mailman/listinfo/rspec-users" target="_blank">http://rubyforge.org/mailman/listinfo/rspec-users</a><br>
<br>
_______________________________________________<br>
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>
</blockquote></div><br>