From e5c88434dbb7dc0690a474ae7c913453bf289328 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 29 Dec 2009 19:04:14 -0800 Subject: Use the correct method for eager loading autoloads --- railties/test/application/configuration_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'railties/test') diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 4d9da525d7..ece41f9de8 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -83,5 +83,21 @@ module ApplicationTests require "#{app_path}/config/application" end end + + test "Frameworks are not preloaded by default" do + require "#{app_path}/config/environment" + + assert ActionController.autoload?(:RecordIdentifier) + end + + test "frameworks are preloaded with config.preload_frameworks is set" do + add_to_config <<-RUBY + config.preload_frameworks = true + RUBY + + require "#{app_path}/config/environment" + + assert !ActionController.autoload?(:RecordIdentifier) + end end end -- cgit v1.2.3