Re: [rspec-users] Authenticating before tests

2007-09-22 Thread Luke Galea
Hi Peter, I ended up settling on having a "ensure_goldberg_loaded" helper in spec_helper and a login_as that "spoofs" the session in the way that set_user would do but without relying on Goldberg. This should make it less coupled with Goldberg and let you test your code without testing gol

Re: [rspec-users] Authenticating before tests

2007-09-17 Thread peter.boling
Luke Galea-4 wrote: > > 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. (

Re: [rspec-users] Authenticating before tests

2007-09-13 Thread Jarkko Laine
On 13.9.2007, at 19.52, sinclair bain wrote: Hi! Have you considered mocking / stubbing to test in isolation if that is appropriate ? Right, my example was also assuming that you are using mocks for users. //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.r

Re: [rspec-users] Authenticating before tests

2007-09-13 Thread sinclair bain
Hi! Have you considered mocking / stubbing to test in isolation if that is appropriate ? sinclair On 9/13/07, Luke Galea <[EMAIL PROTECTED]> 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

Re: [rspec-users] Authenticating before tests

2007-09-13 Thread Jarkko Laine
On 13.9.2007, at 15.25, Luke Galea 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? This is wh

[rspec-users] Authenticating before tests

2007-09-13 Thread Luke Galea
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 t