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.

Documentation

Manual: mockery.pdf
Vignette: Mocks: Integrating with testthat

Maintainer: Noam Finkelstein <noam.finkelstein at jhu.edu>

Author(s): Noam Finkelstein*, Lukasz Bartnik*

Install package and any missing dependencies by running this line in your R console:

install.packages("mockery")

Depends
Imports testthat, utils
Suggests knitr, rmarkdown(>=1.0)
Enhances
Linking to
Reverse
depends
Reverse
imports
Reverse
suggests
cranlike, debugme, prettycode, rGoodData, secret, sessioninfo, subprocess, tracer
Reverse
enhances
Reverse
linking to

Package mockery
Materials
URL https://github.com/n-s-f/mockery
Task Views
Version 0.3.0
Published 2016-12-16
License MIT + file LICENSE
BugReports https://github.com/n-s-f/mockery/issues
SystemRequirements
NeedsCompilation no
Citation
CRAN checks mockery check results
Package source mockery_0.3.0.tar.gz