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.
- Noam Finkelstein [aut, cre], Lukasz Bartnik [aut]
- Date of publication
- 2016-10-25 10:30:48
- Noam Finkelstein <email@example.com>
- MIT + file LICENSE
- Expectation: does the given call match the expected?
- Add expectation to a function.
- Returns the pure R source code for a given function.
- Create and query a mocked function.
- R package to make mocking easier
- Replace a function with a stub.
Files in this package