seattlerb/minitest — pull request #238 by camelpunch (2013-02-03 08:58:10+00:00)
Title: Support for public_send and send calls to mocks

Whilst using MiniTest::Mock to make expectations on code that invokes methods dynamically, I've found myself being forced to use `__send__` instead of the privacy-safe `public_send` I'd prefer to use in most situations. This patch rectifies this by adding `send` and `public_send` to the list of skipped methods in MiniTest::Mock.

Let me know what you think. I'm unsure as to whether you'd want some negative tests in there as well as the positive ones I used to drive these changes. For example, you might want a corresponding `test_blow_up_if_not_called_when_using_send`. I'd be happy to add these if desired.

It's also possible that people would want to put expectations on these methods directly (for better or worse).

Andrew