freerange/mocha — pull request #186 by davidcelis (2014-01-20 19:32:29+00:00)
Title: ExpectationError should subclass StandardError

Directly inheriting from Exception is not considered to be a good Ruby
practice; it's almost always best to subclass from some other, more
descriptive error class, such as StandardError or RuntimeError. Errors
that directly subclass Exception are more intended for things like
signals.

I traced this inheritance to commit
fdcb1503906293745444d8bf49ee624fa7839f75 but no reason was given as to
why this inheritance pattern changed.

It causes bugs when trying to upgrade from, for instance, version 0.9.8
of Mocha to future versions that support `unstub` because all versions
of Rails 3.0.x include an ActiveSupport::TestCase patch that opens up
Mocha::ExpectationError with a base class of StandardError.
https://github.com/rails/rails/blob/3-0-stable/activesupport/lib/active_support/test_case.rb
This is what it should be anyway, so I'm submitting this patch.

Signed-off-by: David Celis