Skip to content

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

@brookslogan

Description

@brookslogan

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> }).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions