Skip to content

mockr

0.2.2

Mocking in R

16packages depend
733.2Kdownloads / year
85.5%test coverage
13/13checks pass

Overview

About
Maintained by Kirill MüllerFirst published 2017-04-294 releasesCRAN page ↗GitHub ↗

Provides a means to mock a package function, i.e., temporarily substitute it for testing. Designed as a drop-in replacement for the now deprecated 'testthat::with_mock()' and 'testthat::local_mock()'.

Install

Health

CRAN checks
13OK
Slowest check: 1.3 min · r-oldrel-macos-x86_64
Code health
Yes
Tests · ratio 0.67
85.5%
Coverage · measured lines
100%
Documentation · exports
2
Dependencies · direct
Check history
  • OK2026-08-05
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 393 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
50%
References docs
33%

Downloads

733.2K
CRAN downloads in the past year
Rank #791 · ~2K/day · ~61.1K/mo
Daily download trend is not available in this view yet.
17K30 days
63.8K90 days
733.2K1 year
Compare downloads with other packages →
Also on1.2K r2u10 autocran578 conda_forge18 c2d4u

Repository

Repository
18Stars
4Forks
2Open issues
0Open PRs
4Releases
412Commits
4Contributors
412 commits · Last activity 2026-08-09

Stars over time

2024-05-31 · 182026-07-07 · 18

Repository practices

Upstream repositoryBeta

5 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/krlmlr/mockr on 2026-08-16.

Continuous integration (1)
GitHub Actions
CRAN release process (1)
cran-comments.md
Docs source (1)
README.Rmd
Lint, format, editor (1)
RStudio project
Show all practices
Coverage (1)
Codecov
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
9 external dependencies (excludes base and recommended)
Depends (0)
none
Imports (2)
LinkingTo (0)
none
Enhances (0)
none

Code & Tests

People & History

People (1)
Maintainer (1)
Author, Maintainer
Authors (1)
Author, Maintainer
Listed in earlier versions (1)
no longer listed · 0.2.0 to 0.2.2
Package Timeline

4 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.2.2Latest
    2025-05-01 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 0.2.1
    2023-02-01 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 0.2.0
    2022-04-02 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • 0.1
    2017-04-29
  • R
    R 3.4.0 released · 2017-04-21

Package metadata

First published
2017-04-29
Total releases
4 / 9 yrs
License
MIT + file LICENSE OSI
Download size
20 KB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("mockr")
Müller, K. (2025). mockr: Mocking in R (Version 0.2.2) [Computer software]. https://doi.org/10.32614/CRAN.package.mockr

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for mockr version 0.2.2 [Data set]. HJJB, LLC. Data release v2026-08-17. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy