---
title: "mocha 3.0.0 Breaking Changes on RubyGems | Since.dev"
description: "What each mocha release removed, renamed or changed: 23 breaking changes in 3 versions on RubyGems, each with its source."
canonical_url: https://since.dev/packages/gem/mocha
last_updated: 2026-12-04
---

# mocha breaking changes

mocha 3.0.0 (December 15, 2025) is its newest release with breaking changes, 10 of them. The first: Removes support for running tests with Minitest below v5 in mocha 3.0.0. Every breaking API change we have recorded in mocha on RubyGems: 23 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `3.1.0`. [Source repository](https://github.com/freerange/mocha)

Its 3.0.0 release drops Ruby 2.1. [Ruby end of life dates](https://since.dev/calendar/ruby.md).

- From [2.0.0](#v-2-0-0) to [3.0.0](#v-3-0-0): 10 breaking changes in 1 version.
- From [1.0.0](#v-1-0-0) to [3.0.0](#v-3-0-0): 19 breaking changes in 2 versions.

## mocha 3.0.0 breaking changes

mocha 3.0.0, released December 15, 2025: 10 breaking changes.

- **Removed**  

Tests can no longer run with Minitest versions older than v5. [github.com](https://github.com/freerange/mocha/blob/v3.0.0/RELEASE.md)
- **Removed** `ParameterMatcher`  

Deprecated ParameterMatcher methods are removed; use the methods now available in ParameterMatcher::Methods. [github.com](https://github.com/freerange/mocha/blob/v3.0.0/RELEASE.md)
- **Removed** `ParameterMatchers.Base`  

The deprecated ParameterMatchers::Base class is removed; include ParameterMatchers::BaseMethods module instead. [github.com](https://github.com/freerange/mocha/blob/v3.0.0/RELEASE.md)
- **Removed** `use_test_unit_gem`  

Documentation for the use_test_unit_gem option is removed; the docs no longer describe it. [github.com](https://github.com/freerange/mocha/blob/v3.0.0/RELEASE.md)
- **Renamed** `stubbee`  

The #stubbee method is renamed to #stubba_object, and #mock_owner is renamed to #stubbee. [github.com](https://github.com/freerange/mocha/blob/v3.0.0/RELEASE.md)
- **Behavior changed**  

Ruby 2.1 is no longer supported; users on that version must upgrade Ruby. [github.com](https://github.com/freerange/mocha/blob/v3.0.0/RELEASE.md)
- **Behavior changed** `Hash.mocha_inspect`  

Failure messages now show hashes in Ruby v1.9 Hash syntax, which changes the displayed text. [github.com](https://github.com/freerange/mocha/blob/v3.0.0/RELEASE.md)
- **Behavior changed** `Mocha.ParameterMatchers.Methods.equivalent_uri`  

Keyword arguments can now match an expectation that expects only positional arguments. [github.com](https://github.com/freerange/mocha/blob/v3.0.0/RELEASE.md)
- **Behavior changed** `Mockery.teardown`  

Calling Mockery.teardown before Mockery.setup now produces an improved error message. [github.com](https://github.com/freerange/mocha/blob/v3.0.0/RELEASE.md)
- **Default changed**  

On Ruby 3 and later, keyword arguments are matched strictly by default; code relying on loose matching may fail. [github.com](https://github.com/freerange/mocha/blob/v3.0.0/RELEASE.md)

## mocha 2.0.0 breaking changes

mocha 2.0.0, released November 1, 2022: 9 breaking changes.

- **Removed**  

Ruby v1.9 is no longer supported; users on Ruby 1.9 must stay on mocha 1.x. [github.com](https://github.com/freerange/mocha/blob/v2.0.0/RELEASE.md)
- **Removed** `Configuration`  

Deprecated methods in Configuration have been removed. [github.com](https://github.com/freerange/mocha/blob/v2.0.0/RELEASE.md)
- **Removed** `minitest`  

Minitest versions earlier than v3.3.0 are no longer supported. [github.com](https://github.com/freerange/mocha/blob/v2.0.0/RELEASE.md)
- **Removed** `mocha.rails init.rb`  

The deprecated Rails plugin init.rb file has been removed. [github.com](https://github.com/freerange/mocha/blob/v2.0.0/RELEASE.md)
- **Removed** `mocha.setup.rb`  

The deprecated mocha/setup.rb setup mechanism has been removed. [github.com](https://github.com/freerange/mocha/blob/v2.0.0/RELEASE.md)
- **Removed** `Remove optional reinstatement of v1.9 behaviour`  

The option to reinstate v1.9 behaviour is gone. [github.com](https://github.com/freerange/mocha/blob/v2.0.0/RELEASE.md)
- **Removed** `test-unit`  

Gem versions of test-unit earlier than v2.5.1 and the Ruby 1.8 standard library version are no longer supported. [github.com](https://github.com/freerange/mocha/blob/v2.0.0/RELEASE.md)
- **Behavior changed** `Expectation.with`  

Keyword arguments can now be matched strictly, which can make previously passing hash-argument expectations fail; check Expectation#with and strict_keyword_argument_matching. [github.com](https://github.com/freerange/mocha/blob/v2.0.0/RELEASE.md)
- **Behavior changed** `mock`  

A mock receiving invocations in another test now fails immediately. [github.com](https://github.com/freerange/mocha/blob/v2.0.0/RELEASE.md)

## mocha 1.0.0 breaking changes

mocha 1.0.0, released January 11, 2014: 4 breaking changes.

- **Behavior changed**  

Stubbed methods now keep the visibility of the original method, so protected or private methods stay non-public. Tests relying on the stubbed method being public may break. [github.com](https://github.com/freerange/mocha/blob/v1.0.0/RELEASE.md)
- **Behavior changed**  

Requiring 'mocha/setup' no longer needs a separate require 'mocha'. [github.com](https://github.com/freerange/mocha/blob/v1.0.0/RELEASE.md)
- **Behavior changed**  

Stubbing a superclass method and calling it on a child class now uses the superclass stub instead of raising an unexpected invocation error. Existing tests relying on the old behaviour may break. [github.com](https://github.com/freerange/mocha/blob/v1.0.0/RELEASE.md)
- **Configuration changed** `mocha.setup`  

Mocha no longer tries to integrate with test libraries automatically. Use require 'mocha/setup' once the test library is loaded, or require 'mocha/test_unit' or 'mocha/mini_test' instead. [github.com](https://github.com/freerange/mocha/blob/v1.0.0/RELEASE.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
