I tell my developers that each mock you use costs you $100. Maybe it is worth it, but probably not.
No I don't really charge em – but it gets the idea across that mocks have costs that you don't always see up front.
No I don't really charge em – but it gets the idea across that mocks have costs that you don't always see up front.
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.