1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Digestor explicit dependency should not contain trailing whitespace

test for rails/rails#8586
This commit is contained in:
Brian Alexander 2012-12-21 14:51:41 -07:00
parent 95f5f8167f
commit 749a745264
3 changed files with 12 additions and 2 deletions

View file

@ -2,7 +2,7 @@ require 'thread_safe'
module ActionView
class Digestor
EXPLICIT_DEPENDENCY = /# Template Dependency: ([^ ]+)/
EXPLICIT_DEPENDENCY = /# Template Dependency: (\S+)/
# Matches:
# render partial: "comments/comment", collection: commentable.comments

View file

@ -6,4 +6,8 @@
<%= render @message.history.events %>
<%# render "something_missing" %>
<%# render "something_missing" %>
<%
# Template Dependency: messages/form
%>

View file

@ -46,6 +46,12 @@ class TemplateDigestorTest < ActionView::TestCase
end
end
def test_explicit_dependency_in_multiline_erb_tag
assert_digest_difference("messages/show") do
change_template("messages/_form")
end
end
def test_second_level_dependency
assert_digest_difference("messages/show") do
change_template("comments/_comments")