When trying to run a test-unit test with the included XML testrunner on 1.8.7, I ended up with a NameError about a missing “TestResultFailureSupport”:

1
2
> ruby test.rb --runner=xml
.rvm/gems/ruby-1.8.7-p334/gems/test-unit-2.3.2/lib/test/unit/testresult.rb:28: uninitialized constant Test::Unit::TestResult::TestResultFailureSupport (NameError)

To solve this, you have to make sure that the file actually loads the test-unit 2.x GEM as opposed to using the included 1.x version from stdlib. You can do this by simply adding this line to your ruby file:

1
gem "test-unit"

Comments