diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-12-16 21:37:48 +0100 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-12-16 22:24:48 +0100 |
commit | e89fff2f6b815529cf729fc8e900a8275c9514e8 (patch) | |
tree | 726650bd29573e6d3aa80107c293b20424287d79 /railties | |
parent | 81cf98d34268546532aa763b2837b3a4c87e60e1 (diff) | |
download | rails-e89fff2f6b815529cf729fc8e900a8275c9514e8.tar.gz rails-e89fff2f6b815529cf729fc8e900a8275c9514e8.tar.bz2 rails-e89fff2f6b815529cf729fc8e900a8275c9514e8.zip |
Bring back config.action_view.cache_template_loading [#5847 state:resolved]
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/configuration_test.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index c12c4a4660..4f4b7beec4 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -280,5 +280,43 @@ module ApplicationTests get "/" assert_equal "/omg/images/foo.jpg", last_response.body end + + test "config.action_view.cache_template_loading with cache_classes default" do + add_to_config "config.cache_classes = true" + require "#{app_path}/config/environment" + require 'action_view/base' + + assert ActionView::Resolver.caching? + end + + test "config.action_view.cache_template_loading without cache_classes default" do + add_to_config "config.cache_classes = false" + require "#{app_path}/config/environment" + require 'action_view/base' + + assert !ActionView::Resolver.caching? + end + + test "config.action_view.cache_template_loading = false" do + add_to_config <<-RUBY + config.cache_classes = true + config.action_view.cache_template_loading = false + RUBY + require "#{app_path}/config/environment" + require 'action_view/base' + + assert !ActionView::Resolver.caching? + end + + test "config.action_view.cache_template_loading = true" do + add_to_config <<-RUBY + config.cache_classes = false + config.action_view.cache_template_loading = true + RUBY + require "#{app_path}/config/environment" + require 'action_view/base' + + assert ActionView::Resolver.caching? + end end end |