On behalf of krist0ff (from GitHub issue http://github.com/floehopper/mocha/issues#issue/3)
if I have a private method on object, and I set an expectation
on it:
object.expects(:private_method)
the visibility of this method is changed to public.
If I have any code, that is checking for visibility of methods,
ie:
if private_methods.include?(:private_method)
then obviously mocha will change the behavior of this code.
temporarily, I work around it with
object.expects(:private_method)
object.class_eval "private :private_method" # fix for mocha issues
which works - that means that mocha doesn't need to make it
public, right?