Class: RSpec::Mocks::Matchers::ExpectationCustomization

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

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

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



8
9
10
11
12
# File 'lib/rspec/mocks/matchers/expectation_customization.rb', line 8

def initialize(method_name, args, block)
  @method_name = method_name
  @args        = args
  @block       = block
end

Instance Attribute Details

- (Object) block

Returns the value of attribute block



6
7
8
# File 'lib/rspec/mocks/matchers/expectation_customization.rb', line 6

def block
  @block
end

Instance Method Details

- (Object) playback_onto(expectation)



14
15
16
# File 'lib/rspec/mocks/matchers/expectation_customization.rb', line 14

def playback_onto(expectation)
  expectation.__send__(@method_name, *@args, &@block)
end