diff --git a/test/xml/test_node_attributes.rb b/test/xml/test_node_attributes.rb index 9671f2aa818..867c68174f9 100644 --- a/test/xml/test_node_attributes.rb +++ b/test/xml/test_node_attributes.rb @@ -16,6 +16,15 @@ def test_attribute_with_ns node.attribute_with_ns('foo', 'http://tenderlovemaking.com/').value end + def test_prefixed_attributes + doc = Nokogiri::XML "" + + node = doc.root + + assert_equal 'en-GB', node[:'xml:lang'] + assert_equal nil, node[:lang] + end + def test_namespace_key? doc = Nokogiri::XML <<-eoxml