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.5)mockthat_0.2.8.zip(r-4.4)mockthat_0.2.8.zip(r-4.3)
mockthat_0.2.8.tgz(r-4.4-any)mockthat_0.2.8.tgz(r-4.3-any)
mockthat_0.2.8.tar.gz(r-4.5-noble)mockthat_0.2.8.tar.gz(r-4.4-noble)
mockthat_0.2.8.tgz(r-4.4-emscripten)mockthat_0.2.8.tgz(r-4.3-emscripten)
mockthat.pdf |mockthat.html✨
mockthat/json (API)
NEWS
# Install 'mockthat' in R: |
install.packages('mockthat', repos = c('https://nbenn.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/nbenn/mockthat/issues
Last updated 2 years agofrom:4a070bfd39. Checks:OK: 7. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Nov 22 2024 |
R-4.5-win | OK | Nov 22 2024 |
R-4.5-linux | OK | Nov 22 2024 |
R-4.4-win | OK | Nov 22 2024 |
R-4.4-mac | OK | Nov 22 2024 |
R-4.3-win | OK | Nov 22 2024 |
R-4.3-mac | OK | Nov 22 2024 |
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 |