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.

  • @wyrmroot@programming.dev
    link
    fedilink
    English
    11 year ago

    Overly fine-grained “brittle” mocks are something to be wary of, I agree that you don’t want to have to change a ton of tests every time you edit the code. But the hand-wavey suggestion of “use a fake instead” with no follow up is not particularly helpful…