floehopper/mocha — Issue #47: An expectation on two classes that inherit from the same class fails.
Author: xn
Created: 2011-12-20 19:21:53+00:00
State: open

```Ruby
mailer = mock()
mailer.stubs(:deliver!)
ServiceMailer.expects(:service_approved_notification).returns(mailer)
AdminMailer.expects(:service_approved_notification).returns(mailer)
@service.approve!
```
```Ruby
after_create do
AdminMailer.new_service_notification(self).deliver!
ServiceMailer.new_service_notification(self).deliver!
end
```
Mocha::ExpectationError: unexpected invocation: ServiceMailer.service_approved_notification(#)
unsatisfied expectations:
- expected exactly once, invoked twice: ServiceMailer.service_approved_notification(any_parameters)
- expected exactly once, not yet invoked: AdminMailer.service_approved_notification(any_parameters)