root / test / test_rexml_issuezilla.rb
| Revision 551:31763927c467, 366 bytes (checked in by Sean Russell <ser@…>, 5 months ago) |
|---|
| Line | |
|---|---|
| 1 | #!/sw/bin/ruby |
| 2 | |
| 3 | require 'test/unit' |
| 4 | require 'rexml/document' |
| 5 | |
| 6 | class TestIssuezillaParsing < Test::Unit::TestCase |
| 7 | def test_rexml |
| 8 | doc = REXML::Document.new(File.new("test/data/ofbiz-issues-full-177.xml")) |
| 9 | ctr = 1 |
| 10 | doc.root.each_element('//issue') do |issue| |
| 11 | assert_equal( ctr, issue.elements['issue_id'].text.to_i ) |
| 12 | ctr += 1 |
| 13 | end |
| 14 | end |
| 15 | end |
Note: See TracBrowser
for help on using the browser.
