diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2014-09-29 21:41:52 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2014-09-29 21:41:52 +0200 |
commit | f939904f23a792f5923b5ed683cbbc54a05ad1fe (patch) | |
tree | 6d0f10e21b42b7dc012017dfb5ad4f5b57c19192 /actionpack/lib | |
parent | 035cc69c48d9d538bded70fc88976cd7f23966f5 (diff) | |
download | rails-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 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 8c10c3e7b0..41d33d4396 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -689,7 +689,7 @@ module ActionController private def document_root_element - html_document.root + html_document end def check_required_ivars diff --git a/actionpack/lib/action_dispatch/testing/assertions.rb b/actionpack/lib/action_dispatch/testing/assertions.rb index f325c35b57..41d00b5e2b 100644 --- a/actionpack/lib/action_dispatch/testing/assertions.rb +++ b/actionpack/lib/action_dispatch/testing/assertions.rb @@ -15,7 +15,7 @@ module ActionDispatch @html_document ||= if @response.content_type =~ /xml$/ Nokogiri::XML::Document.parse(@response.body) else - Nokogiri::HTML::Document.parse(@response.body) + Nokogiri::HTML::DocumentFragment.parse(@response.body) end end end diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 2d1c3ac5c7..c300a4ea0d 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -497,7 +497,7 @@ module ActionDispatch end def document_root_element - html_document.root + html_document end end end |