Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid mocks in favor of stubs and spies #214

Open
khenissimehdi opened this issue Aug 12, 2022 · 0 comments
Open

Avoid mocks in favor of stubs and spies #214

khenissimehdi opened this issue Aug 12, 2022 · 0 comments

Comments

@khenissimehdi
Copy link

khenissimehdi commented Aug 12, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant