From db26a04e3d8f2b30456ae203d6c023b299a8e0f9 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 17 Dec 2018 23:43:22 -0500 Subject: [PATCH] limit test of libxml-specific DocumentFragment#dup behavior ... to only running when testing the libxml2 impl. Related to #1846 and #1063. --- test/xml/test_document_fragment.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/xml/test_document_fragment.rb b/test/xml/test_document_fragment.rb index 242bd9e4f1..a3cfebdbdf 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