Re:Why I don't mock
by emsy on Wednesday May 28, 2014 @10:01AM
(#7809909)
I found the article disappointing. Instead of giving reasonable arguments against mocking, the author offers an example where mocking was used wrong and therefore propagates that it shouldn't be used at all.
The problem is not mocking. I found it to be absolutely helpful if used right (and right often means sparsely).
The problem is this "all or nothing" mentality that many programmers have. Either they mock the hell out of the codebase or they don't use it at all.
I don't use mock objects, unless it's message based business logic, often located at the topmost layer of abstraction.
The problem is not mocking. I found it to be absolutely helpful if used right (and right often means sparsely). The problem is this "all or nothing" mentality that many programmers have. Either they mock the hell out of the codebase or they don't use it at all.
I don't use mock objects, unless it's message based business logic, often located at the topmost layer of abstraction.