Package: mockthat 0.2.8
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:
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
Last updated from:4a070bfd39. Checks:9 OK. Indexed: no.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-x86_64 | OK | 117 | ||
| source / vignettes | OK | 152 | ||
| linux-release-x86_64 | OK | 105 | ||
| macos-release-arm64 | OK | 79 | ||
| macos-oldrel-arm64 | OK | 81 | ||
| windows-devel | OK | 77 | ||
| windows-release | OK | 119 | ||
| windows-oldrel | OK | 54 | ||
| wasm-release | OK | 107 |
Exports:local_mockmockmock_argmock_argsmock_callmock_n_calledwith_mock
Dependencies:rlang
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Mocking helper functions | mock mock_arg mock_args mock_call mock_n_called |
| Mock functions in a package. | local_mock with_mock |
