Sha256: cddd85557ddba2cb06ee00b6d773b75b5be5812a989c6b8181c3c72f131ac856

Contents?: true

Size: 804 Bytes

Versions: 13

Compression:

Stored size: 804 Bytes

Contents

module RSpec
  module Mocks
    # Provides configuration options for rspec-mocks.
    class Configuration
      # 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
      #
      def add_stub_and_should_receive_to(*modules)
        modules.each do |mod|
          mod.__send__(:include, RSpec::Mocks::Methods)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 6 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-mocks-2.13.0/lib/rspec/mocks/configuration.rb
sshp-0.0.2 vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/configuration.rb
sshp-0.0.1 vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/configuration.rb
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/configuration.rb
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/configuration.rb
rspec-mocks-2.13.1 lib/rspec/mocks/configuration.rb
vagrant-actionio-0.0.9 vendor/bundle/gems/rspec-mocks-2.13.0/lib/rspec/mocks/configuration.rb
rspec-mocks-2.13.0 lib/rspec/mocks/configuration.rb
remq-0.0.4 vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/configuration.rb
remq-0.0.3 vendor/bundle/gems/rspec-mocks-2.12.2/lib/rspec/mocks/configuration.rb
rspec-mocks-2.12.2 lib/rspec/mocks/configuration.rb
rspec-mocks-2.12.1 lib/rspec/mocks/configuration.rb
rspec-mocks-2.12.0 lib/rspec/mocks/configuration.rb