Skip to content

Stop including `RSpec::Mocks::ExampleMethods` in the singleton class of the example

gitlab-qa-bot requested to merge fix-102 into master

Created by: myronmarston

This is a followup to rspec/rspec-core#1188. It fixes #102 (closed). (Actually, that was already fixed by those rspec-core changes, I discovered when porting @michihuber's specs from #238).

With this change, the user (or test framework integration gem, or whatever) is responsible for including RSpec::Mocks::ExampleMethods now that RSpec::Mocks.setup no longer does that. I plan to add a deprecation warning to 2.99 for that.

One slightly odd thing is that RSpec::Mocks.setup is now a no-op. I think @samphippen will use it for #449 (and rspec-core still calls it), so I kept it for now. I wasn't sure if the "outside rspec" cukes should call it since it's not strictly needed at this point. I guess we can address that in #449.

@samphippen -- the oddness you saw in #449 should be resolved now.

Merge request reports