module RSpec::Mocks::ObjectVerifyingDoubleMethods

An awkward module necessary because we cannot otherwise have ClassVerifyingDouble inherit from Module and still share these methods.

@private

Public Class Methods

new(doubled_module, *args) click to toggle source
Calls superclass method RSpec::Mocks::VerifyingDouble.new
# File lib/rspec/mocks/verifying_double.rb, line 91
def initialize(doubled_module, *args)
  @doubled_module = doubled_module
  super(doubled_module.description, *args)
end

Public Instance Methods

__build_mock_proxy(order_group) click to toggle source
# File lib/rspec/mocks/verifying_double.rb, line 96
def __build_mock_proxy(order_group)
  VerifyingProxy.new(self, order_group, @name,
    @doubled_module,
    ObjectMethodReference
  )
end
as_stubbed_const(options = {}) click to toggle source
# File lib/rspec/mocks/verifying_double.rb, line 103
def as_stubbed_const(options = {})
  ConstantMutator.stub(@doubled_module.const_to_replace, self, options)
  self
end