aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2014-09-29 21:41:52 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2014-09-29 21:41:52 +0200
commitf939904f23a792f5923b5ed683cbbc54a05ad1fe (patch)
tree6d0f10e21b42b7dc012017dfb5ad4f5b57c19192 /actionview
parent035cc69c48d9d538bded70fc88976cd7f23966f5 (diff)
downloadrails-f939904f23a792f5923b5ed683cbbc54a05ad1fe.tar.gz
rails-f939904f23a792f5923b5ed683cbbc54a05ad1fe.tar.bz2
rails-f939904f23a792f5923b5ed683cbbc54a05ad1fe.zip
Parse HTML as document fragment.
This is to match the changes in Rails Dom Testing rails/rails-dom-testing#20.
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/test_case.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb
index af34d2ce5a..fec980462d 100644
--- a/actionview/lib/action_view/test_case.rb
+++ b/actionview/lib/action_view/test_case.rb
@@ -158,7 +158,7 @@ module ActionView
# Need to experiment if this priority is the best one: rendered => output_buffer
def document_root_element
- Nokogiri::HTML::Document.parse(@rendered.blank? ? @output_buffer : @rendered).root
+ Nokogiri::HTML::DocumentFragment.parse(@rendered.blank? ? @output_buffer : @rendered)
end
def say_no_to_protect_against_forgery!