News for hackers. Stuff that matters.
Re:Database mocks are just not worth it by SvenL on Monday December 30, 2024 @07:22PM (#42555113)
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.

Re:Database mocks are just not worth it by withinboredom on Monday December 30, 2024 @08:39PM (#42555526)
Generally, 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.