Package: mockthat 0.2.8

Nicolas Bennett

mockthat: Function Mocking for Unit Testing

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.

Authors:Nicolas Bennett [aut, cre]

mockthat_0.2.8.tar.gz
mockthat_0.2.8.zip(r-4.7)mockthat_0.2.8.zip(r-4.6)mockthat_0.2.8.zip(r-4.5)
mockthat_0.2.8.tgz(r-4.6-any)mockthat_0.2.8.tgz(r-4.5-any)
mockthat_0.2.8.tar.gz(r-4.7-any)mockthat_0.2.8.tar.gz(r-4.6-any)
mockthat_0.2.8.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
mockthat/json (API)
NEWS

# Install 'mockthat' in R:
install.packages('mockthat', repos = c('https://cynkra.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/nbenn/mockthat/issues

Pkgdown/docs site:https://nbenn.github.io

On CRAN:

Conda:

3.85 score 14 stars 5 scripts 873 downloads 7 exports 1 dependencies

Last updated from:4a070bfd39. Checks:9 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK117
source / vignettesOK152
linux-release-x86_64OK105
macos-release-arm64OK79
macos-oldrel-arm64OK81
windows-develOK77
windows-releaseOK119
windows-oldrelOK54
wasm-releaseOK107

Exports:local_mockmockmock_argmock_argsmock_callmock_n_calledwith_mock

Dependencies:rlang

Readme and manuals

Help Manual

Help pageTopics
Mocking helper functionsmock mock_arg mock_args mock_call mock_n_called
Mock functions in a package.local_mock with_mock