instance method
html_document
Ruby on Rails 5.0.7.2
Since v4.2.11.3Signature
html_document()
No documentation comment.
Source
# File actionpack/lib/action_dispatch/testing/assertions.rb, line 14
def html_document
@html_document ||= if @response.content_type.to_s =~ /xml\z/
Nokogiri::XML::Document.parse(@response.body)
else
Nokogiri::HTML::Document.parse(@response.body)
end
end
Defined in actionpack/lib/action_dispatch/testing/assertions.rb line 14
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Assertions