Last active
August 29, 2015 14:10
-
-
Save tenderlove/6f4814dd082b387e10ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/namespaces/test_namespaces_in_merged_doc.rb b/test/namespaces/test_namespaces_in_merged_doc.rb | |
index fb7355d..d9b739c 100644 | |
--- a/test/namespaces/test_namespaces_in_merged_doc.rb | |
+++ b/test/namespaces/test_namespaces_in_merged_doc.rb | |
@@ -21,7 +21,10 @@ module Nokogiri | |
root = @doc1.at("defs") | |
toadd = @doc2.at("svg") | |
- root.add_child(toadd.children) | |
+ text_node = @doc2.at("text") | |
+ toadd.children.each do |child| | |
+ root.add_child child.clone | |
+ end | |
new_node = @doc1.at("text") | |
@@ -29,9 +32,9 @@ module Nokogiri | |
assert_equal "http://www.w3.org/2000/svg", toadd.namespace.href | |
assert_equal "http://www.w3.org/2000/svg", new_node.namespace.href | |
- assert_equal nil, root.namespace.prefix | |
- assert_equal nil, toadd.namespace.prefix | |
- assert_equal nil, new_node.namespace.prefix #fails, returns "default" | |
+ assert_nil root.namespace.prefix | |
+ assert_nil toadd.namespace.prefix | |
+ assert_nil new_node.namespace.prefix #fails, returns "default" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment