Class: RSpec::Mocks::ProxyForNil

Inherits:
PartialDoubleProxy show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/proxy.rb

Constant Summary

Constants inherited from Proxy

RSpec::Mocks::Proxy::DEFAULT_MESSAGE_EXPECTATION_OPTS

Instance Attribute Summary collapse

Attributes inherited from Proxy

#object

Instance Method Summary collapse

Methods inherited from PartialDoubleProxy

#add_simple_expectation, #add_simple_stub, #message_received, #original_method_handle_for, #reset, #visibility_for

Methods inherited from Proxy

#add_simple_expectation, #add_simple_stub, #as_null_object, #build_expectation, #check_for_unexpected_arguments, #ensure_can_be_proxied!, #ensure_implemented, #has_negative_expectation?, #message_received, #messages_arg_list, #method_double_if_exists_for_message, #null_object?, #original_method_handle_for, prepended_modules_of, #prepended_modules_of_singleton_class, #raise_missing_default_stub_error, #raise_unexpected_message_error, #received_message?, #record_message_received, #remove_stub, #remove_stub_if_present, #replay_received_message_on, #reset, #verify, #visibility_for

Constructor Details

#initialize(order_group) ⇒ ProxyForNil

Returns a new instance of ProxyForNil.



465
466
467
468
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/proxy.rb', line 465

def initialize(order_group)
  set_expectation_behavior
  super(nil, order_group)
end

Instance Attribute Details

#disallow_expectationsObject

Returns the value of attribute disallow_expectations.



470
471
472
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/proxy.rb', line 470

def disallow_expectations
  @disallow_expectations
end

#warn_about_expectationsObject

Returns the value of attribute warn_about_expectations.



471
472
473
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/proxy.rb', line 471

def warn_about_expectations
  @warn_about_expectations
end

Instance Method Details

#add_message_expectation(method_name, opts = {}, &block) ⇒ Object



473
474
475
476
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/proxy.rb', line 473

def add_message_expectation(method_name, opts={}, &block)
  warn_or_raise!(method_name)
  super
end

#add_stub(method_name, opts = {}, &implementation) ⇒ Object



478
479
480
481
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/proxy.rb', line 478

def add_stub(method_name, opts={}, &implementation)
  warn_or_raise!(method_name)
  super
end