Alain Ravet
2008-Feb-14 12:22 UTC
config.plugin_paths << .. in environment/test.rb : ignored in Rails 2.0.2
Hi all,
I used to move test-only plugins (like mocha, ..) to /vendor/plugins-test,
and update config.plugin_paths in environment/test.rb accordingly :
file: environment/test.rb
...
config.plugin_paths << "#{RAILS_ROOT}/vendor/plugins-test"
...
Problem: after upgrading a project to Rails 2.0.2 it stopped working (test
plugins are not loaded)
Though, If I move that line to environment.rb, it works (but it defeats the
purpose of test.rb).
Isn''t this a bug?
Alain Ravet
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Feb-14 14:05 UTC
Re: config.plugin_paths << .. in environment/test.rb : ignored in Rails 2.0.2
On 14 Feb 2008, at 12:22, Alain Ravet wrote:> Hi all, > > I used to move test-only plugins (like mocha, ..) to /vendor/plugins- > test, > and update config.plugin_paths in environment/test.rb accordingly : > file: environment/test.rb > ... > config.plugin_paths << "#{RAILS_ROOT}/vendor/plugins-test" > ... > > Problem: after upgrading a project to Rails 2.0.2 it stopped working > (test > plugins are not loaded) > Though, If I move that line to environment.rb, it works (but it > defeats the > purpose of test.rb). >Rails 2.0 refactored plugin loading, and now plugin load paths are set before the environment is setup (ie before test.rb, development.rb are loaded). This certainly wasn''t intentional, I''d file a ticket/post on rails-core Fred> Isn''t this a bug? > > Alain Ravet > > --~--~---------~--~----~------------~-------~--~----~ > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en > -~----------~----~----~----~------~----~------~--~--- >