Mocha release 0.9.6 heads-up

I just wanted to let you know that there are some changes in the latest Mocha release that might break integration with ActiveSupport::TestCase et al.

The main change is that Mocha no longer loads any testing frameworks itself. Instead, when Mocha is loaded, it looks to see what testing frameworks have *already* been loaded, and monkey-patches them appropriately.

Previously, Mocha used to attempt to load testing frameworks itself, before then monkey-patching them.

This change was in response to a bug report [1] from someone wanting to use Mocha without Rails, Test::Unit or MiniTest. I think this is a legitimate requirement.

The new version of Mocha also avoids loading RubyGems. This Gist [2] explains why it's a bad idea for a library to explicitly load RubyGems.

More details of the Mocha release can be found here [3].

I apologise if these changes cause problems with ActiveSupport::TestCase, but I'm very willing to help fix any problems. I'm going to have a look at the code in ActiveSupport::TestCase now and see whether I can suggest any changes or improvements. I've created a Lighthouse ticket [4] to keep track of any work in this area.

Thanks, James.

[1] #2858 Mocha release 0.9.6 heads-up - Ruby on Rails - rails [2] 54177’s gists · GitHub [3] Mocha Release 0.9.6 - James Mead [4] #2858 Mocha release 0.9.6 heads-up - Ruby on Rails - rails