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
On this page
Latest version 3.13.9.
Packages on RubyGems run on Ruby. Ruby end of life dates.
- From 3.0.0.beta1 to 3.0.0.rc1: 11 breaking changes in 2 versions.
rspec-mocks 3.0.0.rc1 breaking changes
- Removed
RSpec.Mocks.ConstantStubber
RSpec::Mocks::ConstantStubber is removed and no longer available to existing code. github.com - Removed
RSpec.Mocks.TestDouble.extend_onto
TestDouble.extend_onto is removed and no longer available to existing code. github.com - Default changed
Marshal
The Marshal monkey-patch for dumping stubbed objects is now off by default and must be enabled explicitly. github.com
rspec-mocks 3.0.0.beta2 breaking changes
- Removed
and_return
and_return with a block or with no arguments is no longer supported; pass explicit values. github.com - Removed
Double.to_str
Doubles no longer respond to to_str, so code relying on converting them to strings will change. github.com - Removed
RSpec.Mocks.setup
The host argument is removed; include RSpec::Mocks::ExampleMethods directly in the scope instead. github.com - Renamed
RSpec.Mocks.Mock
References to RSpec::Mocks::Mock must use RSpec::Mocks::Double instead. github.com - Behavior changed
Test doubles raise errors if used after being reset, so do not keep references to them across examples. github.com - Behavior changed
Doubles and partial doubles can no longer be used from hooks such as before(:all). github.com - Behavior changed
Argument matchers match using ===, which can change which arguments match existing expectations. github.com - Configuration changed
Test contexts must now include RSpec::Mocks::ExampleMethods to use rspec-mocks. github.com
rspec-mocks 3.0.0.beta1 breaking changes
- Removed
Requiring spec/mocks no longer works; require the RSpec 3 entry point instead. github.com - Removed
Support for Ruby 1.8.6 is removed, so code relying on those workarounds must move to a newer Ruby. github.com - Removed
Null-object test doubles can no longer be shared between examples; create them within each example. github.com - Removed
any_number_of_times
any_number_of_times is removed; use a stub for that behavior instead. github.com - Removed
mock
Use double(name, methods) to create test doubles instead of mock(name, methods). github.com - Removed
stub
Use double(name, methods) to create test doubles instead of stub(name, methods). github.com - Removed
stub!
The stub! method is gone; use allow(...).to receive instead. github.com - Removed
unstub!
The unstub! method is gone; use the allow/expect syntax instead. github.com - Behavior changed
at_least
Calls to at_least(0) now raise an error, so use a different count. github.com - 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
And 2 more in this version. Sign up to see every change
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The 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.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.