CRAN/E | mockthat

mockthat

Function Mocking for Unit Testing in R

Installation

About

With the deprecation of mocking capabilities shipped with 'testthat' as of 'edition 3' it is left to third-party packages to replace this functionality, which in some test-scenarios is essential in order to run unit tests in limited environments (such as no Internet connection). Mocking in this setting means temporarily substituting a function with a stub that acts in some sense like the original function (for example by serving a HTTP response that has been cached as a file). The only exported function 'with_mock()' is modeled after the eponymous 'testthat' function with the intention of providing a drop-in replacement.

nbenn.github.io/mockthat/
Bug report File report

Key Metrics

Version 0.2.6
R ≥ 3.3.0
Published 2021-04-23 1262 days ago
Needs compilation? no
License MIT
License File
CRAN checks mockthat results
Language en-US

Downloads

Yesterday 7 0%
Last 7 days 163 -45%
Last 30 days 887 -38%
Last 90 days 3.038 -0%
Last 365 days 11.996 +44%

Maintainer

Maintainer

Nicolas Bennett

Authors

Nicolas Bennett

aut / cre

Material

README
NEWS
Reference manual
Package source

macOS

r-release

arm64

r-oldrel

arm64

r-release

x86_64

r-oldrel

x86_64

Windows

r-devel

x86_64

r-release

x86_64

r-oldrel

x86_64

Old Sources

mockthat archive

Depends

R ≥ 3.3.0

Imports

utils

Suggests

testthat
pkgload
curl
jsonlite
withr

Reverse Suggests

ricu