Class: RSpec::Mocks::AndCallOriginalImplementation

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

Overview

Represents an `and_call_original` implementation.

Constant Summary

CannotModifyFurtherError =
Class.new(StandardError)

Instance Method Summary (collapse)

Constructor Details

- (AndCallOriginalImplementation) initialize(method)

Returns a new instance of AndCallOriginalImplementation



599
600
601
# File 'lib/rspec/mocks/message_expectation.rb', line 599

def initialize(method)
  @method = method
end

Instance Method Details

- (Object) call(*args, &block)



625
626
627
# File 'lib/rspec/mocks/message_expectation.rb', line 625

def call(*args, &block)
  @method.call(*args, &block)
end

- (Object) initial_action=(value)



605
606
607
# File 'lib/rspec/mocks/message_expectation.rb', line 605

def initial_action=(value)
  raise cannot_modify_further_error
end

- (Object) inner_action



621
622
623
# File 'lib/rspec/mocks/message_expectation.rb', line 621

def inner_action
  true
end

- (Object) inner_action=(value)



609
610
611
# File 'lib/rspec/mocks/message_expectation.rb', line 609

def inner_action=(value)
  raise cannot_modify_further_error
end

- (Boolean) present?

Returns:

  • (Boolean)


617
618
619
# File 'lib/rspec/mocks/message_expectation.rb', line 617

def present?
  true
end

- (Object) terminal_action=(value)



613
614
615
# File 'lib/rspec/mocks/message_expectation.rb', line 613

def terminal_action=(value)
  raise cannot_modify_further_error
end