Class: RSpec::Mocks::AnyInstance::Chain
- Inherits:
-
Object
- Object
- RSpec::Mocks::AnyInstance::Chain
- Includes:
- Customizations
- Defined in:
- lib/rspec/mocks/any_instance/chain.rb
Direct Known Subclasses
Defined Under Namespace
Modules: Customizations
Instance Method Summary collapse
-
#initialize(recorder, *args, &block) ⇒ Chain
constructor
A new instance of Chain.
- #never ⇒ Object
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
#initialize(recorder, *args, &block) ⇒ Chain
Returns a new instance of Chain.
5 6 7 8 9 10 11 |
# File 'lib/rspec/mocks/any_instance/chain.rb', line 5 def initialize(recorder, *args, &block) @recorder = recorder @expectation_args = args @expectation_block = block @source_line = CallerFilter.first_non_rspec_line ensure_expectation_block_has_source_location end |
Instance Method Details
#never ⇒ Object
69 70 71 72 |
# File 'lib/rspec/mocks/any_instance/chain.rb', line 69 def never ErrorGenerator.raise_double_negation_error("expect_any_instance_of(MyClass)") if negated? super end |