Ruby 1.9 Compatibility
Note that Mocha should be compatible with Ruby 1.9.1 using MiniTest or Test::Unit. However, if you want to use Test::Unit, you will need to install the test-unit gem.
- Fixed Lighthouse bug #32 – stub_everything should mean mock responds to anything.
- Added Expectation#twice to improve readability. Thanks to pull request from Celestino Gomes.
- In Ruby 1.9.1, requiring ‘test/unit’ loads a thin wrapper around MiniTest and Test::Unit::TestCase ends up inheriting from MiniTest::Unit::TestCase. So we need to avoid including the Mocha modules more than once to avoid nasty consequences. Thanks to Matthias Hennemeyer for help with this.
- Ruby 1.9 includes rake, but not rake/contrib. For the moment I’ve moved the sshpublisher require into the only rake task that needs it, so that I can at least run the tests in Ruby 1.9. It looks like I will need to build a rake/contrib gem or similar to get this working properly.