Class: RSpec::Mocks::Matchers::Receive::Customization

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/mocks/matchers/receive.rb

Instance Method Summary (collapse)

Constructor Details

- (Customization) initialize(method_name, args, block)

A new instance of Customization

76
77
78
79
80
# File 'lib/rspec/mocks/matchers/receive.rb', line 76
def initialize(method_name, args, block)
  @method_name = method_name
  @args        = args
  @block       = block
end

Instance Method Details

- (Object) playback_onto(expectation)

82
83
84
# File 'lib/rspec/mocks/matchers/receive.rb', line 82
def playback_onto(expectation)
  expectation.__send__(@method_name, *@args, &@block)
end