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

# rspec-mocks breaking changes

rspec-mocks 3.0.0.rc1 (June 2, 2014) is its newest release with breaking changes, 3 of them. The first: Removed RSpec.Mocks.ConstantStubber. Every breaking API change we have recorded in rspec-mocks 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.13.9`. 

Packages on RubyGems run on Ruby. [Ruby end of life dates](https://since.dev/calendar/ruby.md).

- From [3.0.0.beta1](#v-3-0-0-beta1) to [3.0.0.rc1](#v-3-0-0-rc1): 11 breaking changes in 2 versions.

## rspec-mocks 3.0.0.rc1 breaking changes

rspec-mocks 3.0.0.rc1, released June 2, 2014: 3 breaking changes.

- **Removed** `RSpec.Mocks.ConstantStubber`  

RSpec::Mocks::ConstantStubber is removed and no longer available to existing code. [github.com](https://github.com/rspec/rspec-mocks/blob/v3.0.0/Changelog.md)
- **Removed** `RSpec.Mocks.TestDouble.extend_onto`  

TestDouble.extend_onto is removed and no longer available to existing code. [github.com](https://github.com/rspec/rspec-mocks/blob/v3.0.0/Changelog.md)
- **Default changed** `Marshal`  

The Marshal monkey-patch for dumping stubbed objects is now off by default and must be enabled explicitly. [github.com](https://github.com/rspec/rspec-mocks/blob/v3.0.0/Changelog.md)

## rspec-mocks 3.0.0.beta2 breaking changes

rspec-mocks 3.0.0.beta2, released June 2, 2014: 8 breaking changes.

- **Removed** `and_return`  

and_return with a block or with no arguments is no longer supported; pass explicit values. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta2)
- **Removed** `Double.to_str`  

Doubles no longer respond to to_str, so code relying on converting them to strings will change. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta2)
- **Removed** `RSpec.Mocks.setup`  

The host argument is removed; include RSpec::Mocks::ExampleMethods directly in the scope instead. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta2)
- **Renamed** `RSpec.Mocks.Mock`  

References to RSpec::Mocks::Mock must use RSpec::Mocks::Double instead. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta2)
- **Behavior changed**  

Test doubles raise errors if used after being reset, so do not keep references to them across examples. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta2)
- **Behavior changed**  

Doubles and partial doubles can no longer be used from hooks such as before(:all). [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta2)
- **Behavior changed**  

Argument matchers match using ===, which can change which arguments match existing expectations. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta2)
- **Configuration changed**  

Test contexts must now include RSpec::Mocks::ExampleMethods to use rspec-mocks. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta2)

## rspec-mocks 3.0.0.beta1 breaking changes

rspec-mocks 3.0.0.beta1, released June 2, 2014: 12 breaking changes.

- **Removed**  

Requiring spec/mocks no longer works; require the RSpec 3 entry point instead. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta1)
- **Removed**  

Support for Ruby 1.8.6 is removed, so code relying on those workarounds must move to a newer Ruby. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta1)
- **Removed**  

Null-object test doubles can no longer be shared between examples; create them within each example. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta1)
- **Removed** `any_number_of_times`  

any_number_of_times is removed; use a stub for that behavior instead. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta1)
- **Removed** `mock`  

Use double(name, methods) to create test doubles instead of mock(name, methods). [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta1)
- **Removed** `stub`  

Use double(name, methods) to create test doubles instead of stub(name, methods). [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta1)
- **Removed** `stub!`  

The stub! method is gone; use allow(...).to receive instead. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta1)
- **Removed** `unstub!`  

The unstub! method is gone; use the allow/expect syntax instead. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta1)
- **Behavior changed** `at_least`  

Calls to at_least(0) now raise an error, so use a different count. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta1)
- **Behavior changed** `should_not_receive`  

Code that chains and_return onto should_not_receive will now get an explicit error. Remove the and_return call. [github.com](https://github.com/rspec/rspec-mocks/releases/tag/v3.0.0.beta1)

And 2 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## 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.
