Class | Spec::Mocks::Mock |
In: |
lib/spec/mocks/mock.rb
|
Parent: | Object |
Creates a new mock with a name (that will be used in error messages only) == Options:
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 This is an unfortunate side effect from ActiveRecord, but this should be safe unless the RHS redefines == in a nonsensical manner