We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24bacb3 commit bc87e21Copy full SHA for bc87e21
actionpack/lib/action_dispatch/testing/assertions.rb
@@ -12,7 +12,7 @@ module Assertions
12
include Rails::Dom::Testing::Assertions
13
14
def html_document
15
- @html_document ||= if @response.content_type.to_s =~ /xml\z/
+ @html_document ||= if @response.content_type.to_s.end_with?("xml")
16
Nokogiri::XML::Document.parse(@response.body)
17
else
18
Nokogiri::HTML::Document.parse(@response.body)
0 commit comments