Class: RSpec::Mocks::VerifyingProxy

Inherits:
TestDoubleProxy
  • Object
show all
Defined in:
lib/rspec/mocks/verifying_proxy.rb

Overview

A verifying proxy mostly acts like a normal proxy, except that it contains extra logic to try and determine the validity of any expectation set on it. This includes whether or not methods have been defined and the validity of arguments on method calls.

In all other ways this behaves like a normal proxy. It only adds the verification behaviour to specific methods then delegates to the parent implementation.

These checks are only activated if the doubled class has already been loaded, otherwise they are disabled. This allows for testing in isolation.