diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb index 2d0b6cd60248aea2cff7bc9eed71fe059d1c93bf..dda2686a9beb4ebda5a3e4e9bddbc59f35547fec 100644 --- a/actionpack/test/controller/test_case_test.rb +++ b/actionpack/test/controller/test_case_test.rb @@ -401,7 +401,13 @@ def test_should_impose_childless_html_tags_in_html process :test_xml_output, params: { response_as: "text/html" } # auto-closes, so the

becomes a sibling - assert_select "root > area + p" + if defined?(JRUBY_VERSION) + # https://github.com/sparklemotion/nokogiri/issues/1653 + # HTML parser "fixes" "broken" markup in slightly different ways + assert_select "root > map > area + p" + else + assert_select "root > area + p" + end end def test_should_not_impose_childless_html_tags_in_xml