diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-06-11 20:37:09 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-06-11 20:37:09 -0300 |
commit | fcbd2e821e12fdf66ad2f28e97992a7cd75f529e (patch) | |
tree | f1260a3c1039cc14cca4d36a0894124a1447d3a8 /actionview/test | |
parent | de45e4c6cd9d8a6e610863c6ec396ba12b654e55 (diff) | |
parent | 5b196452a59cfc7476668786e027963ac7271639 (diff) | |
download | rails-fcbd2e821e12fdf66ad2f28e97992a7cd75f529e.tar.gz rails-fcbd2e821e12fdf66ad2f28e97992a7cd75f529e.tar.bz2 rails-fcbd2e821e12fdf66ad2f28e97992a7cd75f529e.zip |
Merge pull request #20058 from farukaydin/cache-digests-dependency-rake
add error log that notify 'file not found' when using cache_digest dependency rake
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/digestor_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actionview/test/template/digestor_test.rb b/actionview/test/template/digestor_test.rb index c2b8439df3..f0afcdb5ae 100644 --- a/actionview/test/template/digestor_test.rb +++ b/actionview/test/template/digestor_test.rb @@ -111,6 +111,18 @@ class TemplateDigestorTest < ActionView::TestCase end end + def test_logging_of_missing_template_for_dependencies + assert_logged "'messages/something_missing' file doesn't exist, so no dependencies" do + dependencies("messages/something_missing") + end + end + + def test_logging_of_missing_template_for_nested_dependencies + assert_logged "'messages/something_missing' file doesn't exist, so no dependencies" do + nested_dependencies("messages/something_missing") + end + end + def test_nested_template_directory assert_digest_difference("messages/show") do change_template("messages/actions/_move") @@ -298,6 +310,14 @@ class TemplateDigestorTest < ActionView::TestCase ActionView::Digestor.digest({ name: template_name, finder: finder }.merge(options)) end + def dependencies(template_name) + ActionView::Digestor.new({ name: template_name, finder: finder }).dependencies + end + + def nested_dependencies(template_name) + ActionView::Digestor.new({ name: template_name, finder: finder }).nested_dependencies + end + def finder @finder ||= FixtureFinder.new end |