From 7f1dc4ad454c10573405f6d1c29e70341ff7f618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 22 Aug 2012 22:05:52 -0300 Subject: before_eager_load only runs when eager_load is true --- railties/test/application/initializers/hooks_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties') diff --git a/railties/test/application/initializers/hooks_test.rb b/railties/test/application/initializers/hooks_test.rb index 7b3e6844fd..7c48696672 100644 --- a/railties/test/application/initializers/hooks_test.rb +++ b/railties/test/application/initializers/hooks_test.rb @@ -20,11 +20,11 @@ module ApplicationTests assert $foo end - test "hooks block works correctly without cache classes (before_eager_load is not called)" do + test "hooks block works correctly without eager_load (before_eager_load is not called)" do add_to_config <<-RUBY $initialization_callbacks = [] config.root = "#{app_path}" - config.cache_classes = false + config.eager_load = false config.before_configuration { $initialization_callbacks << 1 } config.before_initialize { $initialization_callbacks << 2 } config.before_eager_load { Boom } @@ -35,11 +35,11 @@ module ApplicationTests assert_equal [1,2,3], $initialization_callbacks end - test "hooks block works correctly with cache classes" do + test "hooks block works correctly with eager_load" do add_to_config <<-RUBY $initialization_callbacks = [] config.root = "#{app_path}" - config.cache_classes = true + config.eager_load = true config.before_configuration { $initialization_callbacks << 1 } config.before_initialize { $initialization_callbacks << 2 } config.before_eager_load { $initialization_callbacks << 3 } -- cgit v1.2.3