From 798372d0997350e2294387979da2dadd3831438c Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Thu, 7 Aug 2014 20:18:02 +0200 Subject: [PATCH] Test for element attributes without namespaces. --- spec/oga/xml/parser/elements_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/oga/xml/parser/elements_spec.rb b/spec/oga/xml/parser/elements_spec.rb index 10fc35a..4cbccb7 100644 --- a/spec/oga/xml/parser/elements_spec.rb +++ b/spec/oga/xml/parser/elements_spec.rb @@ -15,7 +15,7 @@ describe Oga::XML::Parser do end example 'do not set a namespace' do - @element.namespace.nil?.should == true + @element.namespace.should be_nil end end @@ -49,6 +49,10 @@ describe Oga::XML::Parser do example 'set the bar attribute' do @element.attribute('bar').value.should == 'baz' end + + example 'do not set the attribute namespace' do + @element.attribute('bar').namespace.should be_nil + end end context 'elements with namespaced attributes' do