class RSpec::Mocks::DirectObjectReference
@see NamedObjectReference
Represents a reference to that object.
or {ExampleMethods#class_double}.
an anonymous class or module is passed to {ExampleMethods#instance_double}
Used when an object is passed to {ExampleMethods#object_double}, or
An implementation of rspec-mocks’ reference interface.
def const_to_replace
implementations. Raises an `ArgumentError` to indicate that `as_stubbed_const`
Defined for interface parity with the other object reference
def const_to_replace raise ArgumentError, "Can not perform constant replacement with an anonymous object." end
def defined?
-
(true)
-
def defined? true end
def description
-
(String)
- the object's description (via `#inspect`).
def description @object.inspect end
def initialize(object)
-
object
(Object
) -- the object to which this refers
def initialize(object) @object = object end
def target
-
(Object)
-
def target @object end
def when_loaded
- Yield: - the target of this reference.
def when_loaded yield @object end