diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-08-27 10:05:01 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-08-27 10:05:01 -0700 |
commit | d6854dfe13ae0b6cd683c69f35635d44954b7cc6 (patch) | |
tree | 9d1773fc4e7055d3a87d86b3c13b3c70e09e0f2a /actionview/test/template | |
parent | 7967fa9251c1c8e6a27d765a1e7cc0a377f97965 (diff) | |
parent | 7e74a01f849db3b85ac04ce425461c22b2b191d3 (diff) | |
download | rails-d6854dfe13ae0b6cd683c69f35635d44954b7cc6.tar.gz rails-d6854dfe13ae0b6cd683c69f35635d44954b7cc6.tar.bz2 rails-d6854dfe13ae0b6cd683c69f35635d44954b7cc6.zip |
Merge pull request #11768 from cloudspace/cache_template_loading
Only cache template digests if !config.cache_template_loading
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/digestor_test.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/actionview/test/template/digestor_test.rb b/actionview/test/template/digestor_test.rb index 67e3775f28..c6608e214a 100644 --- a/actionview/test/template/digestor_test.rb +++ b/actionview/test/template/digestor_test.rb @@ -184,6 +184,15 @@ class TemplateDigestorTest < ActionView::TestCase assert_not_equal digest_phone, digest_fridge_phone end + def test_cache_template_loading + resolver_before = ActionView::Resolver.caching + ActionView::Resolver.caching = false + assert_digest_difference("messages/edit", true) do + change_template("comments/_comment") + end + ActionView::Resolver.caching = resolver_before + end + private def assert_logged(message) old_logger = ActionView::Base.logger @@ -200,9 +209,9 @@ class TemplateDigestorTest < ActionView::TestCase end end - def assert_digest_difference(template_name) + def assert_digest_difference(template_name, persistent = false) previous_digest = digest(template_name) - ActionView::Digestor.cache.clear + ActionView::Digestor.cache.clear unless persistent yield |