Other packages > Find by keyword >

mockthat  

Function Mocking for Unit Testing
View on CRAN: Click here


Download and install mockthat package within the R console
Install from CRAN:
install.packages("mockthat")

Install from Github:
library("remotes")
install_github("cran/mockthat")

Install by package version:
library("remotes")
install_version("mockthat", "0.2.8")



Attach the package and use:
library("mockthat")
Maintained by
Nicolas Bennett
[Scholar Profile | Author Map]
First Published: 2020-12-09
Latest Update: 2022-11-01
Description:
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.
How to cite:
Nicolas Bennett (2020). mockthat: Function Mocking for Unit Testing. R package version 0.2.8, https://cran.r-project.org/web/packages/mockthat. Accessed 07 May. 2025.
Previous versions and publish date:
0.2.4 (2020-12-09 11:20), 0.2.6 (2021-04-23 11:00)
Other packages that cited mockthat R package
View mockthat citation profile
Other R packages that mockthat depends, imports, suggests or enhances
Complete documentation for mockthat
Functions, R codes and Examples using the mockthat R package
Some associated functions: helpers . mock . 
Some associated R codes: helpers.R . mock.R .  Full mockthat package functions and examples
Downloads during the last 30 days
04/0704/0804/0904/1004/1104/1204/1304/1404/1504/1604/1704/1804/1904/2004/2104/2204/2304/2404/2504/2604/2704/2804/2904/3005/0105/0205/0305/0405/0505/06Downloads for mockthat102030405060708090TrendBars

Today's Hot Picks in Authors and Packages

quickcode  
Quick and Essential 'R' Tricks for Better Scripts
The NOT functions, 'R' tricks and a compilation of some simple quick plus often used 'R' codes to im ...
Download / Learn more Package Citations See dependency  
MLDS  
Maximum Likelihood Difference Scaling
Difference scaling is a method for scaling perceived supra-threshold differences. The package cont ...
Download / Learn more Package Citations See dependency  
aroma.affymetrix  
Analysis of Large Affymetrix Microarray Data Sets
A cross-platform R framework that facilitates processing of any number of Affymetrix microarray samp ...
Download / Learn more Package Citations See dependency  
funLBM  
Model-Based Co-Clustering of Functional Data
The funLBM algorithm allows to simultaneously cluster the rows and the columns of a data matrix wher ...
Download / Learn more Package Citations See dependency  
humanize  
Create Values for Human Consumption
An almost direct port of the 'python' 'humanize' package . Thi ...
Download / Learn more Package Citations See dependency  

24,205

R Packages

207,311

Dependencies

65,312

Author Associations

24,206

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA