Tools for Mocking

From testthat

Provide tools for “mocking”, temporarily redefining a function so that it behaves differently during tests.

  • with_mocked_bindings()
  • local_mocked_bindings()

Other alternatives: