123456789_123456789_123456789_123456789_123456789_

Class: RSpec::Mocks::InstanceVerifyingDouble Private

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
Inherits: Object
Defined in: rspec-mocks/lib/rspec/mocks/verifying_double.rb

Overview

A mock providing a custom proxy that can verify the validity of any method stubs or expectations against the public instance methods of the given class.

Instance Attribute Summary

TestDouble - Included

#null_object?

Returns true if this object has received ‘as_null_object`.

Instance Method Summary

VerifyingDouble - Included

TestDouble - Included

#==

This allows for comparing the mock to other objects that proxy such as ActiveRecords belongs_to proxy objects.

#__build_mock_proxy_unless_expired, #__disallow_further_usage!,
#as_null_object

Tells the object to respond to all messages.

#freeze

Override for default freeze implementation to prevent freezing of test doubles.

#initialize

Creates a new test double with a ‘name` (that will be used in error messages only).

#inspect, #respond_to?, #to_s, #__build_mock_proxy, #__mock_proxy, #__raise_expired_error, #assign_stubs, #initialize_copy, #method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RSpec::Mocks::VerifyingDouble

Instance Method Details

#__build_mock_proxy(order_group)

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/verifying_double.rb', line 75

def __build_mock_proxy(order_group)
  VerifyingProxy.new(self, order_group,
                     @doubled_module,
                     InstanceMethodReference
  )
end