Always interesting to hear different points of view on this subject. Personally I think mocks make sense to capture complex sets of interactions or otherwise difficult to reach error conditions, so I don’t think it’s a do or do-not kind of thing.
Always interesting to hear different points of view on this subject. Personally I think mocks make sense to capture complex sets of interactions or otherwise difficult to reach error conditions, so I don’t think it’s a do or do-not kind of thing.
I’m assuming we’re talking about test mocks.
I’m quite partial to using mocks within hard-to-reach code. I was curious the other day when I saw the Primeagen saying test mocks are awful - I’m not that heated about it either way and I think if it will take an hour of dev time or a simple mock I would always prioritize using the mock.