aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-22 22:05:52 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-22 22:05:52 -0300
commit7f1dc4ad454c10573405f6d1c29e70341ff7f618 (patch)
tree30732d6f872209dc8277fdcb53ffbde0b2794cfb /railties
parent6a79aa7f815df4409f7ccdff98c85216fa5cdb0f (diff)
downloadrails-7f1dc4ad454c10573405f6d1c29e70341ff7f618.tar.gz
rails-7f1dc4ad454c10573405f6d1c29e70341ff7f618.tar.bz2
rails-7f1dc4ad454c10573405f6d1c29e70341ff7f618.zip
before_eager_load only runs when eager_load is true
Diffstat (limited to 'railties')
-rw-r--r--railties/test/application/initializers/hooks_test.rb8
1 files changed, 4 insertions, 4 deletions
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 }