From e89fff2f6b815529cf729fc8e900a8275c9514e8 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Thu, 16 Dec 2010 21:37:48 +0100 Subject: Bring back config.action_view.cache_template_loading [#5847 state:resolved] --- railties/test/application/configuration_test.rb | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'railties/test') 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 -- cgit v1.2.3