adds tests for Digestor#nested_dependencies

This commit is contained in:
Ryan T. Hosford 2016-02-13 03:28:05 -06:00
parent ac9d32bf90
commit fe698bad34
2 changed files with 12 additions and 0 deletions

@ -0,0 +1,2 @@
<%# Template Dependency: messages/message %>
<%= render "comments/comments" %>

@ -130,6 +130,16 @@ def test_logging_of_missing_template_for_nested_dependencies
end
end
def test_getting_of_singly_nested_dependencies
singly_nested_dependencies = ["messages/header", "messages/form", "messages/message", "events/event", "comments/comment"]
assert_equal singly_nested_dependencies, nested_dependencies('messages/edit')
end
def test_getting_of_doubly_nested_dependencies
doubly_nested = [{"comments/comments"=>["comments/comment"]}, "messages/message"]
assert_equal doubly_nested, nested_dependencies('messages/peek')
end
def test_nested_template_directory
assert_digest_difference("messages/show") do
change_template("messages/actions/_move")