aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing/assertions/selector.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/assertions/selector.rb')
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/selector.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb
index 1d72dc1513..53e7675f7c 100644
--- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb
@@ -323,18 +323,15 @@ module ActionDispatch
end
end
- def response_from_page
- html_document.root
- end
-
# +html_document+ is used in testing/integration.rb
def html_document
@html_document ||= if @response.content_type =~ /xml$/
- Loofah.xml_document(@response.body)
+ Loofah.xml_fragment(@response.body)
else
- Loofah.document(@response.body)
+ Loofah.fragment(@response.body)
end
end
+ alias :response_from_page :html_document
class HTMLSelector #:nodoc:
attr_accessor :root, :css_selector, :comparisons, :message