3 ms·
The person who changes it should write a test to verify his change, right? Ultimately the person should write the test in the same file as the previous tests, c
by SvenL 2y ago
The person who changes it should write a test to verify his change, right? Ultimately the person should write the test in the same file as the previous tests, chances are high it will be seen there. And even if not, the person doing the change should write a test, so no time bomb there?
And yes, people forget to write tests, sure, but even then it would be a time bomb without mocks.
I‘m not a friend of mocks either, but most examples here are not really an issue with mocks.
- withinboredom 2y agoGenerally, mocks are quite far away from what they are mocking. You might mock out a library, for example. I can guarantee you that the library author will not show up at your workplace to update your mocks.