mockery: Mocking Library for R
Version 0.3.0

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.

AuthorNoam Finkelstein [aut, cre], Lukasz Bartnik [aut]
Date of publication2016-12-16 08:33:58
MaintainerNoam Finkelstein <noam.finkelstein@jhu.edu>
LicenseMIT + file LICENSE
Version0.3.0
URL https://github.com/n-s-f/mockery
Package repositoryView on CRAN
InstallationInstall the latest version of this package by entering the following in R:
install.packages("mockery")

Getting started

README.md
Mocks: Integrating with `testthat`

Popular man pages

call-expectations: Expectation: does the given call match the expected?
mock: Create and query a mocked function.
mockery: R package to make mocking easier
stub: Replace a function with a stub.
See all...

All man pages Function index File listing

Man pages

call-expectations: Expectation: does the given call match the expected?
mock: Create and query a mocked function.
mockery: R package to make mocking easier
stub: Replace a function with a stub.

Functions

call-expectations Man page
create_create_new_name_function Source code
expect_args Man page Source code
expect_call Man page Source code
expect_called Man page Source code
is_mock Source code
length.mock Man page Source code
mock Man page Source code
mock_args Man page Source code
mock_calls Man page Source code
mockery Man page
mockery-package Man page
ordinal Source code
override_seperators Source code
stub Man page

Files

TODO
inst
inst/doc
inst/doc/mocks-and-testthat.R
inst/doc/mocks-and-testthat.html
inst/doc/mocks-and-testthat.Rmd
tests
tests/testthat.R
tests/testthat
tests/testthat/test_stub.R
tests/testthat/test-mock-object.R
NAMESPACE
R
R/mockery.R
R/mock-object.R
R/expectations.R
R/stub.R
vignettes
vignettes/mocks-and-testthat.Rmd
README.md
MD5
build
build/vignette.rds
DESCRIPTION
man
man/mock.Rd
man/stub.Rd
man/call-expectations.Rd
man/mockery.Rd
LICENSE
mockery documentation built on May 19, 2017, 6:31 p.m.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.