summaryrefslogtreecommitdiff
path: root/test/rexml/xpath
diff options
context:
space:
mode:
Diffstat (limited to 'test/rexml/xpath')
-rw-r--r--test/rexml/xpath/test_base.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/rexml/xpath/test_base.rb b/test/rexml/xpath/test_base.rb
index 790dcaea221..5a03087ca6d 100644
--- a/test/rexml/xpath/test_base.rb
+++ b/test/rexml/xpath/test_base.rb
@@ -880,10 +880,12 @@ module REXMLTests
<tada xmlns=''>xb</tada>
</tag1>
XML
- x = d.root
- num = 0
- x.each_element('tada') { num += 1 }
- assert_equal(1, num)
+ actual = []
+ d.root.each_element('tada') do |element|
+ actual << element.to_s
+ end
+ assert_equal(["<tada>xa</tada>", "<tada xmlns=''>xb</tada>"],
+ actual)
end
def test_ticket_39