Skip to content

Investigate testthat::{with,local}_mocked_bindings #110

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

Closed
brookslogan opened this issue May 22, 2023 · 0 comments · Fixed by #115
Closed

Investigate testthat::{with,local}_mocked_bindings #110

brookslogan opened this issue May 22, 2023 · 0 comments · Fixed by #115

Comments

@brookslogan
Copy link
Contributor

We might want to take a look at testthat::{with,local}_mocked_bindings, which takes lessons from mockr and mockery. (This is not to be confused with the deprecated testthat::with_mock.)

Issues with status quo: while testing #99 I encountered some issues with mockery::stub where (a) a natural-seeming stub call wasn't actually correct, and (b) adjusting to try to use depth didn't seem to work, though a workaround was easy, and (c) when attempting to debug some tests, I wanted to evaluate some chunks of the test in a REPL, but running stub has lasting effects unless packaged inside a test_that or local({ <code> }).

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 a pull request may close this issue.

1 participant