Unique spec node names for Document#each_node.

This makes it a little bit easier to see if the order is actually correct.
This commit is contained in:
Yorick Peterse 2014-08-01 22:09:08 +02:00
parent 8899542971
commit 7fab231992
1 changed files with 7 additions and 7 deletions

View File

@ -34,12 +34,12 @@ describe Oga::XML::Document do
before do before do
@document = parse(<<-EOF.strip.gsub(/\s+/m, '')) @document = parse(<<-EOF.strip.gsub(/\s+/m, ''))
<books> <books>
<book> <book1>
<title>Foo</title> <title1>Foo</title1>
</book> </book1>
<book> <book2>
<title>Bar</title> <title2>Bar</title2>
</book> </book2>
</books> </books>
EOF EOF
end end
@ -51,7 +51,7 @@ describe Oga::XML::Document do
names << (node.is_a?(Oga::XML::Element) ? node.name : node.text) names << (node.is_a?(Oga::XML::Element) ? node.name : node.text)
end end
names.should == %w{books book title Foo book title Bar} names.should == %w{books book1 title1 Foo book2 title2 Bar}
end end
example 'yield the document indexes' do example 'yield the document indexes' do