From 2cc4f4258a61dd638da2f72d27b26753a72f886f Mon Sep 17 00:00:00 2001 From: Timm Date: Thu, 25 Jul 2013 20:03:28 +0200 Subject: Changed html_document to use fragments. Changed response_from_page to be an alias of html_document. --- actionpack/lib/action_dispatch/testing/assertions/selector.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'actionpack/lib') 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 -- cgit v1.2.3