Skip to content

Add example of mocking using with-redefs #57

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

Merged
merged 1 commit into from
Aug 23, 2022
Merged

Add example of mocking using with-redefs #57

merged 1 commit into from
Aug 23, 2022

Conversation

anderseknert
Copy link

Resolves #51

Signed-off-by: Anders Eknert anders@eknert.com

Resolves #51

Signed-off-by: Anders Eknert <anders@eknert.com>
@lread
Copy link
Collaborator

lread commented Aug 23, 2022

Oh thanks! I thought you were still somehow using clj-http-fake with redefs and was curious to learn what magic you had come up with. Lee's law: if I can misunderstand I will misunderstand.

This makes more sense! Thanks for the PR!

@lread lread merged commit 392e700 into clj-commons:master Aug 23, 2022
@anderseknert anderseknert deleted the add-example-mocking branch August 23, 2022 11:53
@anderseknert
Copy link
Author

Hah! Yeah, no I gave that up rather quickly. While I had used with-redefs some time in the past, it wasn't the first thing I reached for, and hence how I ended up finding that fake library. Given how with-redefs solved the problem so well, I'm honestly not sure why you'd even need that in the first place. Oh well, good to have some examples in the docs either way :)

@lread
Copy link
Collaborator

lread commented Aug 23, 2022

Yup! Thanks again for your contribution!

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.

Mocking with clj-http-fake doesn't seem to work
2 participants