[mocha-developer] ParameterMatcher backwards compatibility broken
jamesmead44 at gmail.com
Thu Nov 15 13:05:34 EST 2007
I've just committed (revision 194) a first stab at supporting optional
parameter matching. More about this later, but in the meantime I
wanted to warn anyone bold enough to be working with "edge" Mocha,
that any custom parameter matchers they have written will be broken by
However it is easy enough to fix them. You need to derive the matcher
from ParameterMatcher::Base and you need to change the "==" method to
"matches?". This method is now supplied with an array of the remaining
parameters to match and you are expected to "consume" any parameters
that you match.
It's probably easiest to see in an example  which includes both old
and new versions. And here  is a diff file for the same class.
Please let me know if I've broken anything.
More information about the mocha-developer