Method: Spec::Mocks::Mock#==

Defined in:
lib/spec/mocks/mock.rb

#==(other) ⇒ Object

This allows for comparing the mock to other objects that proxy such as ActiveRecords belongs_to proxy objects. By making the other object run the comparison, we’re sure the call gets delegated to the proxy target.



25
26
27
# File 'lib/spec/mocks/mock.rb', line 25

def ==(other)
  other == __mock_proxy
end