cfcosta / minitest-firemock

Makes your MiniTest mocks more resilient.
31 stars 1 forks source link

Fold? #1

Closed zenspider closed 9 years ago

zenspider commented 12 years ago

The only real difference of using MiniTest::FireMock instead of MiniTest::Mock is that if MyClass is defined, and my_method isn't there, it'll raise a MockExpectationError. It checks also for the arity of the method, so it'll raise a MockExpectationError if the real method have a different arity than the expectation.

Is there any reason why this change shouldn't be folded into MT::Mock?

cfcosta commented 12 years ago

Well, it behaves differently than MT::Mock. There's no good other reason (as long as MT mantainers like the idea) not to, though.

cfcosta commented 12 years ago

Just remembered something: as of now, it will fail for methods handled by method_missing. I can push back the changes, but I don't think this should be the default behavior.