Skip to content

Avoid mocks in favor of stubs and spies  #214

Open
@khenissimehdi

Description

@khenissimehdi

Avoid mocks in favor of stubs and spies

Correct me if im wrong but i was reading this paper (Mocks Aren't Stubs) you provided about test doubles, and then i compared it to what you wrote.

In the paper they say the following :

Mock objects always use behavior verification, a stub can go either way. Meszaros refers to stubs that use behavior verification as a Test Spy. The difference is in how exactly the double runs and verifies and I'll leave that for you to explore on your own.

but what is written on your documentation is ( i think maybe i didn't understand what you said ) is not the same where mocks are pushed as they don't follow behavior verification and that stubs are fully designed for behavior verification but in reality they can go either way (stubs).

So can you please provide a clearer answer about that section because im kind of confused

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions