diff --git a/test/integration/test_ad_hoc.rb b/test/integration/test_ad_hoc.rb index 4d5f0cb..dab1139 100644 --- a/test/integration/test_ad_hoc.rb +++ b/test/integration/test_ad_hoc.rb @@ -226,8 +226,7 @@ def test_dont_remove_whitespace_between_tags it "Loofah.document removes the comment" do sanitized = Loofah.document(html) - sanitized_html = sanitized.to_html - refute_match(/--/, sanitized_html) + refute(sanitized.children.any? { |node| node.comment? } ) end it "Loofah.scrub_document removes the comment" do