diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/assertions')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/selector.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb index ff7b611228..5045197415 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb @@ -329,12 +329,16 @@ module ActionDispatch 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) else Loofah.document(@response.body) end - @html_document.root end class ArgumentFilter #:nodoc: |