Sometimes you get an error like this:
1) Error:
test_successful_build_data(DamageControl::CruiseControlLogParserTest):
NameError: undefined local variable or method `num' for REXML::Encoding:Module
c:/ruby/lib/ruby/1.8/rexml/encodings/ISO-8859-1.rb:13
c:/ruby/lib/ruby/1.8/rexml/encoding.rb:29:in `load'
c:/ruby/lib/ruby/1.8/rexml/encoding.rb:29:in `encoding='
c:/ruby/lib/ruby/1.8/rexml/source.rb:41:in `encoding='
c:/ruby/lib/ruby/1.8/rexml/parsers/baseparser.rb:183:in `pull'
c:/ruby/lib/ruby/1.8/rexml/parsers/pullparser.rb:45:in `pull'
./damagecontrol/cruisecontrol/CruiseControlLogParser.rb:40:in `parse_top_level'
./damagecontrol/cruisecontrol/CruiseControlLogParser.rb:27:in `parse'
./damagecontrol/cruisecontrol/CruiseControlLogParser.rb:25:in `open'
./damagecontrol/cruisecontrol/CruiseControlLogParser.rb:25:in `parse'
damagecontrol/cruisecontrol/CruiseControlLogParserTest.rb:14:in `test_successful_build_data'
This is because the REXML distributed with certain versions of Ruby is pretty crappy. So DamageControl includes its own REXML version but in order to have the included version override the version distributed with Ruby you need to specify the switch "-I<damagecontrol home>/server" (or "-I." if you are in that directory) when starting the test-suite or the server.
So instead of:
ruby damagecontrol/AllTests.rb # will not work!
then do:
ruby -I. damagecontrol/AllTests.rb
Labels
(None)
