Ross ROSS = Recommend OSS · open-source software intelligence for agents

freerange/mocha

A mocking and stubbing library for Ruby observed · 2026-08-28

github.com/freerange/mocha · homepage · Ruby · NOASSERTION (other) observed · 2026-08-28

Health v2 · maintenance only

74/100

  • Activity 92
  • Release rhythm 35
  • Longevity 100

Flags: no_releases no_license

How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: n/a
  • age_days: 6542
  • days_rel: n/a
  • days_push: 51
  • n_releases_24m: 0

Full methodology

Adoption not part of the score

1284 stars · 158 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

Mocha is a Ruby library for mocking and stubbing in unit tests, providing a unified syntax for full and partial mocking of test doubles. It integrates with Minitest, Test::Unit, RSpec, and Cucumber.

Use cases

  • stub methods on Ruby objects in unit tests
  • create mock objects with expectations for unit testing
  • mock with Minitest
  • use mocha adapter with RSpec
  • partially mock existing Ruby objects
  • verify method invocation counts in tests

When to choose

  • you need mocks or stubs in Ruby tests with Minitest, Test::Unit, or RSpec
  • you want a simple, readable mocking syntax
  • you need partial mocking of real objects

When to avoid

  • you need test spies or fake objects, which Mocha deliberately does not support
  • you are not writing Ruby
  • you prefer RSpec's built-in double/expect syntax

Facets

library · maturity stable

testing mocking testing developer-tools ruby test-double stubbing minitest test-unit rspec

4 sources

Member repositories

RepositoryRoleHealth v2
freerange/mochamain74

For agents

markdown · JSON · MCP: product_card(name="freerange/mocha")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem