-
Notifications
You must be signed in to change notification settings - Fork 26
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
Should stubs be protected
too?
#56
Labels
question
Further information is requested
Comments
randycoulman
pushed a commit
to randycoulman/hammox
that referenced
this issue
Oct 9, 2020
Closes msz#56 Currently, only mocks created with `expect` are type-checked by Hammox. This provides the same protection for stubs created with `stub`.
Merged
Yes! This was an oversight, because I barely ever use I think For |
randycoulman
pushed a commit
to randycoulman/hammox
that referenced
this issue
Oct 12, 2020
Closes msz#56 Currently, only mocks created with `expect` are type-checked by Hammox. This provides the same protection for stubs created with `stub`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As I was reading through the code, I noticed that while
expect
wraps the replacement implementation withprotected
,stub
(andstub_with
) do not.Is there a reason for this decision? Would you consider a PR that wraps
stub
's code withprotected
?I'm thinking of an implementation like this:
I'm not sure what a protected implementation for
stub_with
would look like, though, so ideas are welcome there.Thanks for this awesome library!
The text was updated successfully, but these errors were encountered: