We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Vinay B. N. • 8 years ago

What if the special offer has to be sent over sms, if email fails? Can mocking still be avoided?

Philippe Bourgau • 8 years ago

Interesting. Mocks are really a pain, and should be avoided as much as possible. They remain helpful to cut dependencies when testing larger chunks of a system though. In this case, I came to the conclusion that using full fledged in-memory fake implementations is better than mocking frameworks.

Guowei Lv • 8 years ago

Thanks for commenting, I think Uncle Bob also is against mocking frameworks. I agree that in most cases the mock should be pretty straightforward to write, if not, most likely we are doing something wrong or over complicated.