Skip to content

mockery

0.4.5

Mocking Library for R

172packages depend
1.3Mdownloads / year
99.3%test coverage
13/13checks pass

Overview

About
Maintained by Hadley WickhamFirst published 2016-10-259 releasesCRAN page ↗GitHub ↗

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_mocked_binding() facility present in the 'testthat' package.

Install

Health

CRAN checks
13OK
Slowest check: 1.5 min · r-oldrel-macos-x86_64
Code health
Yes
Tests · ratio 1.13
99.3%
Coverage · measured lines
100%
Documentation · exports
1
Dependencies · direct
Check history
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

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

Downloads

1.3M
CRAN downloads in the past year
Rank #485 · ~3.6K/day · ~108.8K/mo
Daily download trend is not available in this view yet.
49.4K30 days
168.9K90 days
1.3M1 year
Compare downloads with other packages →
Also on6.9K r2u87 autocran5.5K conda_forge20 c2d4u

Repository

Repository
104Stars
10Forks
4Open issues
0Open PRs
8Releases
165Commits
13Contributors
165 commits · Last activity 2025-09-04 · 0% stars, 30d

Stars over time

2025-07-16 · 1022026-07-07 · 104

Repository practices

Upstream repositoryBeta

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

Checks run against github.com/r-lib/mockery on 2026-07-30.

Continuous integration (1)
GitHub Actions
CRAN release process (2)
cran-comments.mdrevdep/
Lint, format, editor (1)
RStudio project
Coverage (1)
Codecov
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.6
Imports (1)
LinkingTo (0)
none
Suggests (3)
Enhances (0)
none

Code & Tests

People & History

People (4)
Maintainer (1)
Author, Maintainer · added in 0.4.3
Authors (4)
Author, Maintainer · added in 0.4.3
Author · added in 0.4.2
Package Timeline

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

  • R
    R 4.6.0 released · 2026-04-24
  • 0.4.5Latest
    2025-09-04 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 0.4.4
    2023-09-26 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • 0.4.3
    2022-02-20 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • 0.4.2
    2019-09-04 · diff ↗
  • unarchivedReturned to CRAN
    2019-09-04
  • R
    R 3.6.0 released · 2019-04-26
  • 0.4.1.1
    2018-08-19 · diff ↗
  • orphanedOrphaned by its maintainer
    2018-08-19
    check problems were not corrected despite reminders
  • R
    R 3.5.0 released · 2018-04-23
Show 6 earlier events
  • 0.4.1
    2017-11-10 · diff ↗
  • 0.4.0
    2017-11-07 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • 0.3.0
    2016-12-16 · diff ↗
  • 0.2.0
    2016-10-25
  • R
    R 3.3.0 released · 2016-05-03

Package metadata

First published
2016-10-25
Total releases
9 / 10 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.6
Download size
21 KB
Installed size
not tracked yet
With dependencies
not tracked yet
Report a problem with this page →