module ActionDispatch::Assertions

Public Instance Methods

html_document() click to toggle source
# File lib/action_dispatch/testing/assertions.rb, line 15
def html_document
  @html_document ||= if @response.content_type.to_s.end_with?("xml")
    Nokogiri::XML::Document.parse(@response.body)
  else
    Nokogiri::HTML::Document.parse(@response.body)
  end
end