Namespace

Module

Methods

Included Modules

Instance Public methods

html_document()

# File actionpack/lib/action_dispatch/testing/assertions.rb, line 13
def html_document
  @html_document ||= if @response.media_type&.end_with?("xml")
    Nokogiri::XML::Document.parse(@response.body)
  else
    Nokogiri::HTML::Document.parse(@response.body)
  end
end