diff --git a/test/xml/test_node.rb b/test/xml/test_node.rb index df52f67931e..0e903c20d0a 100644 --- a/test/xml/test_node.rb +++ b/test/xml/test_node.rb @@ -1033,6 +1033,14 @@ def test_namespace_in_rendered_xml subject.namespace = ns assert_match subject.to_xml, /xmlns="bar"/ end + + def test_text_node_colon + document = Nokogiri::XML::Document.new + root = Nokogiri::XML::Node.new 'foo', document + document.root = root + root << "hello:with_colon" + assert_match document.to_xml, /hello:with_colon/ + end end end end