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

docs: mock, fake stub guidelines #76

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

yanksyoon
Copy link
Contributor

To differentiate between testing mocks, fakes and stubs.

Comment on lines +477 to +481
Mock: implements the interface of an object under test, used to verify
interactions between classes.
Stub: implements predefined answers to calls, used to verify different code
paths.
Fake: a lightweight implementation of an object. e.g. in memory db.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should link to an article or something that goes into more depth here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - I'm also thinking about updating this with an example but the documentation might become lengthy so perhaps an article might be better :D

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

Successfully merging this pull request may close these issues.

2 participants