Package: mockery 0.4.4.9000
mockery: Mocking Library for R
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.
Authors:
mockery_0.4.4.9000.tar.gz
mockery_0.4.4.9000.zip(r-4.5)mockery_0.4.4.9000.zip(r-4.4)mockery_0.4.4.9000.zip(r-4.3)
mockery_0.4.4.9000.tgz(r-4.4-any)mockery_0.4.4.9000.tgz(r-4.3-any)
mockery_0.4.4.9000.tar.gz(r-4.5-noble)mockery_0.4.4.9000.tar.gz(r-4.4-noble)
mockery_0.4.4.9000.tgz(r-4.4-emscripten)mockery_0.4.4.9000.tgz(r-4.3-emscripten)
mockery.pdf |mockery.html✨
mockery/json (API)
NEWS
# Install 'mockery' in R: |
install.packages('mockery', repos = c('https://r-lib.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/r-lib/mockery/issues
Last updated 1 years agofrom:147de292dc. Checks:OK: 5 NOTE: 2. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Nov 24 2024 |
R-4.5-win | NOTE | Nov 24 2024 |
R-4.5-linux | NOTE | Nov 24 2024 |
R-4.4-win | OK | Nov 24 2024 |
R-4.4-mac | OK | Nov 24 2024 |
R-4.3-win | OK | Nov 24 2024 |
R-4.3-mac | OK | Nov 24 2024 |
Exports:expect_argsexpect_callexpect_calledmockmock_argsmock_callsstub
Dependencies:briocallrclicrayondescdiffobjdigestevaluatefsgluejsonlitelifecyclemagrittrpkgbuildpkgloadpraiseprocessxpsR6rlangrprojroottestthatwaldowithr
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Expectation: does the given call match the expected? | call-expectations expect_args expect_call expect_called |
Create and query a mocked function. | length.mock mock mock_args mock_calls |
R package to make mocking easier | mockery-package mockery |
Replace a function with a stub. | stub |