c(
person("Noam", "Finkelstein", role = "aut"),
person("Lukasz", "Bartnik", role = "aut"),
person("Jim", "Hester", role = "aut"),
person("Hadley", "Wickham", , "hadley@rstudio.com", role = c("aut", "cre"))
)
The two main functionalities of this package are creating
mock objects (functions) and selectively intercepting calls to a given
function that originate in some other function. It can be used with
any testing framework available for R. Mock objects can be injected
with either this package's own stub() function or a similar
with_mock() facility present in the 'testthat' package.
Noam Finkelstein [aut],
Lukasz Bartnik [aut],
Jim Hester [aut],
Hadley Wickham [aut, cre]

Provides a means to mock a package function, i.e., temporarily substitute it for testing. Designed as a drop-in replacement for 'testthat::with_mock()', which may break in R 3.4.0 and later.

person(given = "Kirill",
family = "M\u00fcller",
role = c("aut", "cre"),
email = "krlmlr+r@mailbox.org")
Provides a means to mock a package function, i.e.,
temporarily substitute it for testing. Designed as a drop-in
replacement for the now deprecated 'testthat::with_mock()' and
'testthat::local_mock()'.
covr, fs, knitr, pkgload, rmarkdown, testthat, usethis

person(given = "Nicolas",
family = "Bennett",
role = c("aut", "cre"),
email = "nicolas.bennett@stat.math.ethz.ch")
With the deprecation of mocking capabilities shipped with
'testthat' as of 'edition 3' it is left to third-party packages to replace
this functionality, which in some test-scenarios is essential in order to
run unit tests in limited environments (such as no Internet connection).
Mocking in this setting means temporarily substituting a function with a
stub that acts in some sense like the original function (for example by
serving a HTTP response that has been cached as a file). The only exported
function 'with_mock()' is modeled after the eponymous 'testthat' function
with the intention of providing a drop-in replacement.
testthat, curl, jsonlite, datasets, withr