Provides configuration options for rspec-mocks.
Adds `stub` and `should_receive` to the given modules or classes. This is usually only necessary if you application uses some proxy classes that “strip themselves down” to a bare minimum set of methods and remove `stub` and `should_receive` in the process.
@example
RSpec.configure do |rspec| rspec.mock_with :rspec do |mocks| mocks.add_stub_and_should_receive_to Delegator end end
# File lib/rspec/mocks/configuration.rb, line 20 def add_stub_and_should_receive_to(*modules) modules.each do |mod| mod.__send__(:include, RSpec::Mocks::Methods) end end