Hi!<div><br class="webkit-block-placeholder"></div><div>Have you considered mocking / stubbing to test in isolation if that is appropriate ?</div><div><br class="webkit-block-placeholder"></div><div>sinclair<br><br><div><span class="gmail_quote">
On 9/13/07, <b class="gmail_sendername">Luke Galea</b> &lt;<a href="mailto:galeal_lists@ideaforge.org">galeal_lists@ideaforge.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br><br>I&#39;m using Goldberg, an engine that provides roles based access<br>control for my app. I need to login before I can do controller tests,<br>but I can&#39;t find any examples of people doing this.<br><br>
Could someone point me in the right direction?<br><br>I thought the simplest way would be to either call the login action<br>from my other tests before(:all), but I can&#39;t seem to find how to<br>call another controller from within the spec for a different
<br>controller. (Results in @controller is nil).<br><br>I&#39;ve also tried setting session[:user] in before(:all), but session<br>is nil at that point!<br><br>Any help would be greatly appreciated.<br><br>Thanks,<br>Luke
<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">http://rubyforge.org/mailman
</a>/listinfo/rspec-users<br></blockquote></div><br></div>