Class: RSpec::Mocks::AnyInstance::Chain

Inherits:
Object
  • Object
show all
Includes:
Customizations
Defined in:
lib/rspec/mocks/any_instance/chain.rb

Direct Known Subclasses

ExpectationChain

Defined Under Namespace

Modules: Customizations

Instance Method Summary (collapse)

Methods included from Customizations

#and_call_original, #and_raise, #and_return, #and_throw, #and_yield, #any_number_of_times, #at_least, #at_most, #exactly, #once, record, #times, #twice, #with

Constructor Details

- (Chain) initialize(recorder, *args)

A new instance of Chain



5
6
7
8
9
# File 'lib/rspec/mocks/any_instance/chain.rb', line 5

def initialize(recorder, *args, &block)
  @recorder          = recorder
  @expectation_args  = args
  @expectation_block = block
end

Instance Method Details

- (Object) never



67
68
69
70
# File 'lib/rspec/mocks/any_instance/chain.rb', line 67

def never
  ErrorGenerator.raise_double_negation_error("expect_any_instance_of(MyClass)") if negated?
  super
end