diff --git a/test/xml/test_document_fragment.rb b/test/xml/test_document_fragment.rb index 242bd9e4f17..a3cfebdbdff 100644 --- a/test/xml/test_document_fragment.rb +++ b/test/xml/test_document_fragment.rb @@ -263,11 +263,13 @@ def test_issue_1077_parsing_of_frozen_strings Nokogiri::XML::DocumentFragment.parse(input) # assert_nothing_raised end - def test_dup_should_exist_in_a_new_document - # https://github.com/sparklemotion/nokogiri/issues/1063 - original = Nokogiri::XML::DocumentFragment.parse("

hello

") - duplicate = original.dup - assert_not_equal original.document, duplicate.document + if Nokogiri.uses_libxml? + def test_dup_should_exist_in_a_new_document + # https://github.com/sparklemotion/nokogiri/issues/1063 + original = Nokogiri::XML::DocumentFragment.parse("

hello

") + duplicate = original.dup + assert_not_equal original.document, duplicate.document + end end def test_dup_should_create_an_xml_document_fragment