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

Better advice for mocked base functions. #1979

Closed
wants to merge 1 commit into from

Conversation

jonthegeek
Copy link
Contributor

If the function is used as an argument somewhere, binding NULL to it causes that call to fail. Instead bind the actual function, and then mock that.

I think it might also be necessary to do the same for the other default packages, but I'm not certain. Will likely know better at the end of TDD!

If the function is used as an argument somewhere, binding NULL to it causes that call to fail. Instead bind the actual function, and then mock that.

I think it might also be necessary to do the same for the other default packages, but I'm not certain. Will likely know better at the end of TDD!
@hadley
Copy link
Member

hadley commented Aug 23, 2024

That's not a good solution either because you're effectively including a copy of that function into your package.

@hadley hadley closed this Aug 23, 2024
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