Namespace
Module
Methods
Included Modules
- ActionDispatch::Assertions::ResponseAssertions
- ActionDispatch::Assertions::RoutingAssertions
- Rails::Dom::Testing::Assertions
Instance Public methods
html_document()
📝 Source code
# File actionpack/lib/action_dispatch/testing/assertions.rb, line 16
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
🔎 See on GitHub