Method: ActionDispatch::Assertions#html_document
- Defined in:
- actionpack/lib/action_dispatch/testing/assertions.rb
#html_document ⇒ Object
17 18 19 20 21 22 23 |
# File 'actionpack/lib/action_dispatch/testing/assertions.rb', line 17 def html_document @html_document ||= if @response.media_type&.end_with?("xml") Nokogiri::XML::Document.parse(@response.body) else Rails::Dom::Testing.html_document.parse(@response.body) end end |