aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/test_case.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view/test_case.rb')
-rw-r--r--actionview/lib/action_view/test_case.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb
index 7edfc436a6..af34d2ce5a 100644
--- a/actionview/lib/action_view/test_case.rb
+++ b/actionview/lib/action_view/test_case.rb
@@ -158,8 +158,7 @@ module ActionView
# Need to experiment if this priority is the best one: rendered => output_buffer
def document_root_element
- @html_document ||= Nokogiri::HTML::Document.parse(@rendered.blank? ? @output_buffer : @rendered)
- @html_document.root
+ Nokogiri::HTML::Document.parse(@rendered.blank? ? @output_buffer : @rendered).root
end
def say_no_to_protect_against_forgery!