Comment by jweir
5 days ago
No, it is that mocks can hide interface changes. So if you have a mock, then you need to test that the interface works without the mock. And if you are doing that, why not just skip the mock?
foo calls x(user, date) foo mock # tests pass
x changes to x(user, time)
but the tests for foo do not change, tests still pass, runtime errors.
If you have static/strong typing the compiler will pick this up – but for dynamic languages you have a problem.
No comments yet
Contribute on Hacker News ↗