Re: acts_as_authenticated plugin test help

Bala Paranj
Wed, 13 Dec 2006 21:40:51 -0000

For testing controllers which require login, there was a thread earlier on
this list, search for the thread "Testing Actions Requiring A Login".
The Rails Recipes book has a recipe that shows another way to deal with this
problem. It shows how to stub out the login functionality so that you can
focus on the core application functionality.

I am using RESTful authentication plugin and I am still figuring out how to
use the suggestions from the above thread. Last night I was getting error
message when I passed in the user_id, I have to look at the source for the
generated code so that I can replicate the login in the functional test. I
will post an update when I make progress.


On 12/13/06, rails.stuff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
<rails.stuff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
>
>
> PS. I am using the AuthenticatedTestHelper and its _login_as_ method.
> However this requires that every test method must login. I was just
> looking
> for a differnet way ... if there is one. = )
>
> Thank you for all and any help.
> sinclair