[rspec-users] Authenticating before tests
rspec.user at gmail.com
Thu Sep 13 12:52:05 EDT 2007
Have you considered mocking / stubbing to test in isolation if that is
On 9/13/07, Luke Galea <galeal_lists at ideaforge.org> wrote:
> Hi all,
> I'm using Goldberg, an engine that provides roles based access
> control for my app. I need to login before I can do controller tests,
> but I can't find any examples of people doing this.
> Could someone point me in the right direction?
> I thought the simplest way would be to either call the login action
> from my other tests before(:all), but I can't seem to find how to
> call another controller from within the spec for a different
> controller. (Results in @controller is nil).
> I've also tried setting session[:user] in before(:all), but session
> is nil at that point!
> Any help would be greatly appreciated.
> rspec-users mailing list
> rspec-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users