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:
parent
95f5f8167f
commit
749a745264
3 changed files with 12 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -6,4 +6,8 @@
|
|||
|
||||
<%= render @message.history.events %>
|
||||
|
||||
<%# render "something_missing" %>
|
||||
<%# render "something_missing" %>
|
||||
|
||||
<%
|
||||
# Template Dependency: messages/form
|
||||
%>
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue