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.

Version: 0.4.4
Imports: testthat
Suggests: knitr, R6, rmarkdown (≥ 1.0)
Published: 2023-09-26
DOI: 10.32614/CRAN.package.mockery
Author: Noam Finkelstein [aut], Lukasz Bartnik [aut], Jim Hester [aut], Hadley Wickham [aut, cre]
Maintainer: Hadley Wickham <hadley at>
License: MIT + file LICENSE
NeedsCompilation: no
Materials: README NEWS
CRAN checks: mockery results


Reference manual: mockery.pdf
Vignettes: Mocks: Integrating with testthat


Package source: mockery_0.4.4.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): mockery_0.4.4.tgz, r-oldrel (arm64): mockery_0.4.4.tgz, r-release (x86_64): mockery_0.4.4.tgz, r-oldrel (x86_64): mockery_0.4.4.tgz
Old sources: mockery archive

Reverse dependencies:

Reverse imports: gitear, githubinstall, MSstatsShiny
Reverse suggests: activatr, and, asciicast, azlogr, biomaRt, bootGOF, callr, cellxgenedp, cfid, civis, cli, confcons, conflr, coursekata, covidcast, covr, cpp11, cpp11armadillo, cranlike, crayon, cucumber, dadjokeapi, data.tree, DataFakeR, debugme, devtools, droll, DSMolgenisArmadillo, dwctaxon, easystats, epwshiftr, fipio, fledge, gh, gitcreds, googleCloudVisionR, greta, hypothesis, ijtiff, imagefluency, installr, keyring, labNorm, lacrmr, languageserver, lintr, mailmerge, mcmcensemble, metaDigitise, miniCRAN, mixR, mknapsack, mmrm, mobsim, MolgenisArmadillo, MolgenisAuth, MtreeRing, nanoparquet, natmanager, newsanchor, NHSRplotthedots, nlrx, npi, odin, opencage, optedr, orderly, ottr, overture, packrat, pacs, pak, pathfindR, paws.common, PhilipsHue, pins, pkgbuild, pkgcache, pkgdepends, pkgsearch, PKPDsim, plinkQC, plumber, pocketapi, prettycode, prompt, Rarr, rcmdcheck, reactable.extras, redcapAPI, RedditExtractoR, remotes, restez, rhdf5, Rhdf5lib, rhino, rhub, ROCaggregator, roxytypes, rpaleoclim, RTD, rversions, SAME, sankey, sasr, secret, sentryR, sessioninfo, shiny.fluent, shiny.gosling, shiny.semantic, shinyobjects, simpleMH, smdocker, tracer, vaultr, vetiver, whoami, wildmeta, xaringanthemer, xml2, ZillowR, zoltr


Please use the canonical form to link to this page.