Class RR::Injections::DoubleInjection
In: lib/rr/injections/double_injection.rb
Parent: Injection

RR::DoubleInjection is the binding of an subject and a method. A double_injection has 0 to many Double objects. Each Double has Argument Expectations and Times called Expectations.

Methods

Included Modules

ClassInstanceMethodDefined

Constants

MethodArguments = Struct.new(:arguments, :block)
BoundObjects = {}

Attributes

doubles  [R] 
method_name  [R] 
subject_class  [R] 

Public Class methods

Public Instance methods

RR::DoubleInjection#bind injects a method that acts as a dispatcher that dispatches to the matching Double when the method is called.

It binds the original method implementation on the subject if one exists.

Resets the DoubleInjection for the passed in subject and method_name.

RR::DoubleInjection#verify verifies each Double TimesCalledExpectation are met.

Verifies the DoubleInjection for the passed in subject and method_name.

Protected Instance methods

[Validate]