I believe the issue is that you have required the 'minitest' gem, but are trying to use the classes in the 'test-unit' gem. 'Minitest' is installed by default in Ruby 1.9 instead of 'Test-Unit' (which was installed by default in 1.8). Minitest is only partially backwards compatible with Test-Unit.
Possible solutions:
Switch to Minitest:
It is the Test::Unit::AssertionFailedError
in the verify method that is causing the exception. You could change it to the minitest equivalent, which appears to be MiniTest::Assertion
. So your verify method would become:
def verify(&blk)
yield
rescue MiniTest::Assertion => ex
@verification_errors << ex
end
Use Test-Unit instead of Minitest:
Assuming you have the test-unit gem already installed (gem install test-unit
), manually specify that you want to use that gem when doing require 'test/unit'
:
gem "test-unit"
require "test/unit"