Forum: Ruby Amrita 1.0.2 fails its unit tests

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B013a92b64915f94d1fe5854277ce624?d=identicon&s=25 Ben Gribaudo (Guest)
on 2006-01-12 17:40
(Received via mailing list)
Hi folks,

Amrita 1.0.2 fails 5 of its unit tests when I run them. After
downloading a fresh copy of Amrita, uncompressing it and uploading it to
an Ubuntu 5.10 box, I received the test failures below.

Any idea why I receive these errors? It would seem this package should
pass its test out of the box.

Thanks,
Ben


  1) Error:
TestTemplate#test_template_file2:
NameError: uninitialized constant REXML::File
    ./lib/amrita/xml.rb:101:in `parse_file'
    ./lib/amrita/template.rb:274:in `load_template'
    ./lib/amrita/template.rb:208:in `setup_template'
    ./lib/amrita/template.rb:115:in `expand'
    test/testtemplate.rb:120:in `test_template_file2'
    /usr/lib/ruby/1.8/runit/testcase.rb:42:in `run'
    /usr/lib/ruby/1.8/runit/testsuite.rb:23:in `run'
    /usr/lib/ruby/1.8/runit/testsuite.rb:23:in `run'

  2) Failure:
TestFormat2#test_expand_by_proc2
    [test/testformat2.rb:189:in `test_expand_by_proc2'
     /usr/lib/ruby/1.8/runit/testcase.rb:42:in `run'
     /usr/lib/ruby/1.8/runit/testsuite.rb:23:in `run'
     /usr/lib/ruby/1.8/runit/testsuite.rb:23:in `run']:
<"\n<li color=\"blue\">0</li>\n<li color=\"red\">1</li>\n<li
color=\"blue\">2</li>\n<li color=\"red\">3</li>\n<li
color=\"blue\">4</li>\n<li color=\"red\">5</li>"> expected but was
<"<li color=\"blue\">0</li><li color=\"red\">1</li><li
color=\"blue\">2</li><li color=\"red\">3</li><li
color=\"blue\">4</li><li color=\"red\">5</li>">.

  3) Failure:
TestParts#test_parts_withcache
    [test/testparts.rb:156:in `test_parts_withcache'
     /usr/lib/ruby/1.8/runit/testcase.rb:42:in `run'
     /usr/lib/ruby/1.8/runit/testsuite.rb:23:in `run'
     /usr/lib/ruby/1.8/runit/testsuite.rb:23:in `run']:
<"<p><em>xxx</em></p>"> expected but was
<"<p>#&lt;TestParts::EMText:0xb7b537bc&gt;</p>">.

  4) Failure:
TestXML#test_listener
    [test/testxml.rb:42:in `test_listener'
     /usr/lib/ruby/1.8/runit/testcase.rb:42:in `run'
     /usr/lib/ruby/1.8/runit/testsuite.rb:23:in `run'
     /usr/lib/ruby/1.8/runit/testsuite.rb:23:in `run']:
<"<?xml version=\"1.0\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona...
xmlns=\"http://www.w3.org/1999/xhtml\"> <head> <title>xhtml
sample</title> </head> <body> <h1 id=\"title\">title</h1> <p
id=\"body\">body text</p> <hr> </body> </html>"> expected but was
<"<?xml version=\"1.0\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona...
xmlns=\"http://www.w3.org/1999/xhtml\"> <head> <title>xhtml
sample</title> </head> <body> <h1 id=\"title\">title</h1> <p
id=\"body\">body text</p> <hr> </body> </html> ">.

  5) Error:
TestXML#test_amx1:
NameError: uninitialized constant REXML::File
    ./lib/amrita/amx.rb:59:in `[]'
    test/testxml.rb:103:in `test_amx1'
    /usr/lib/ruby/1.8/runit/testcase.rb:42:in `run'
    /usr/lib/ruby/1.8/runit/testsuite.rb:23:in `run'
    /usr/lib/ruby/1.8/runit/testsuite.rb:23:in `run'

140 tests, 881 assertions, 3 failures, 2 errors:
This topic is locked and can not be replied to.