diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2013-01-24 23:51:31 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-01-24 23:54:41 +0000 |
commit | 0757b3388ffe4f44b60de950d40e18ef05055931 (patch) | |
tree | 8b5f292821e46fd5811837d79fde818bb5e1c022 /railties/test/application | |
parent | ccaeb6b6671609aa07d386bbe24d44a996f40e1e (diff) | |
download | rails-0757b3388ffe4f44b60de950d40e18ef05055931.tar.gz rails-0757b3388ffe4f44b60de950d40e18ef05055931.tar.bz2 rails-0757b3388ffe4f44b60de950d40e18ef05055931.zip |
Deprecate the `eager_load_paths` configuration
Since the default in Rails 4.0 is to run in 'threadsafe' mode we need
to eager load all of the paths in `autoload_paths` so we alias
`eager_load_paths` to it. This may have unintended consequences if
you have added 'lib' to `autoload_paths` such as loading unneeded
code or code intended only for development and/or test environments.
If this applies to your application you should thoroughly check what
is being eager loaded.
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/initializers/load_path_test.rb | 2 | ||||
-rw-r--r-- | railties/test/application/paths_test.rb | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/railties/test/application/initializers/load_path_test.rb b/railties/test/application/initializers/load_path_test.rb index 31811e7f92..595f58bd91 100644 --- a/railties/test/application/initializers/load_path_test.rb +++ b/railties/test/application/initializers/load_path_test.rb @@ -64,7 +64,7 @@ module ApplicationTests add_to_config <<-RUBY config.root = "#{app_path}" - config.eager_load_paths << "#{app_path}/lib" + config.autoload_paths << "#{app_path}/lib" RUBY require "#{app_path}/config/environment" diff --git a/railties/test/application/paths_test.rb b/railties/test/application/paths_test.rb index 4029984ce9..f6a77a0d17 100644 --- a/railties/test/application/paths_test.rb +++ b/railties/test/application/paths_test.rb @@ -54,11 +54,11 @@ module ApplicationTests assert_equal root("app", "controllers"), @paths["app/controllers"].expanded.first end - test "booting up Rails yields a list of paths that are eager" do - eager_load = @paths.eager_load - assert eager_load.include?(root("app/controllers")) - assert eager_load.include?(root("app/helpers")) - assert eager_load.include?(root("app/models")) + test "booting up Rails yields a list of paths that will be eager loaded" do + autoload_paths = @paths.autoload_paths + assert autoload_paths.include?(root("app/controllers")) + assert autoload_paths.include?(root("app/helpers")) + assert autoload_paths.include?(root("app/models")) end test "environments has a glob equal to the current environment" do |