Forum: Rails Engines development LoginEngine UserController fails tests

Posted by Jay Levitt (Guest)
on 2006-08-18 05:22
(Received via mailing list)
Using Rails 1.1.6, engines 1.1.4, and either LoginEngine 1.0.2 or trunk, 
I
see a bunch of errors running user_controller_test.rb, along the lines 
of:

Exception: undefined method `redirect_to_stored_or_default' for
#<UserController:0x4e039a8>
/cygdrive/c/dev/src/eclipse/AuthEngine2/config/../vendor/plugins/login_engine/app/controllers/user_controller.rb:25:in
`login'

I'm a little fuzzy on how that method (which is defined in
lib/authenticated_system.rb) should have been available to 
UserController
anyway.  But it doesn't seem to be anymore.

What might have changed in engines or (more likely, I'm guessing) Rails
dependency resolving?

Jay
Posted by Jon Lim (Guest)
on 2006-08-18 17:32
(Received via mailing list)
Hi Jay,

Do you have any other engines installed?
Please check against login_engine/branches/rb_1.0.

If there is still a problem, then please file a bug:
http://dev.rails-engines.org/

Thanks.
Jon
Posted by Jay Levitt (Guest)
on 2006-08-22 02:06
(Received via mailing list)
On Fri, 18 Aug 2006 16:32:09 +0100, Jon Lim wrote:

> On 18/08/06, Jay Levitt <jay+news@jay.fm> wrote:
>> Using Rails 1.1.6, engines 1.1.4, and either LoginEngine 1.0.2 or trunk, I
>> see a bunch of errors running user_controller_test.rb, along the lines of:
>>
>> Exception: undefined method `redirect_to_stored_or_default' for
>> #<UserController:0x4e039a8>

Figured out what was causing this.  I was testing in an empty 
application,
and though I'd added Engines.start to environment.rb, I hadn't added
"require 'login_engine'" to controllers/application.rb.  So controllers
weren't getting the AuthenticatedSystem methods.

Should user_controller_test perform that require, so it doesn't depend 
on
the application?  I think maybe it should...


Jay
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.