I was converting an existing rails app to an engine... that worked fine
-
just put everything in an engine (controllers, models, etc.). All tests
passed if they were in the engine but, for functional tests, outside of
the
engine, the paths to the engine don't seem to be being found.
If I put this in my environment things work again:
%W( app/controllers app/helpers app/models app/views lib ).each do |p|
config.load_paths += %W( #{RAILS_ROOT}/vendor/plugins/nzwe/#{p} )
end
Any idea what I'm missing here? Seems like having that in your
environment
isn't a great idea because it seems like the engine plugin does that for
you, except, apparently, when running functional test.
The exact error is:
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:266:in
`load_missing_constant': uninitialized constant ApplicationController
(NameError)
Which I think means it's failing to load some require/includes in
application.rb
I'm using Engines::Testing.set_fixture_path in the test_helper.rb if
that
matters.
-ben
on 2007-06-06 21:04
on 2007-06-06 23:16
On 6/6/07, ben wiseley <wiseleyb@gmail.com> wrote: > The exact error is: > /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:266:in > `load_missing_constant': uninitialized constant ApplicationController > (NameError) It sounds like you're trying to load one of your controllers before Rails is ready. Are you doing anything with your controllers in your init.rb files?
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
Log in with Google account | Log in with Yahoo account
No account? Register here.