Class: RSpec::Mocks::VerifyingExistingClassNewMethodDouble
- Inherits:
-
VerifyingExistingMethodDouble
- Object
- MethodDouble
- VerifyingMethodDouble
- VerifyingExistingMethodDouble
- RSpec::Mocks::VerifyingExistingClassNewMethodDouble
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/verifying_proxy.rb
Overview
Used in place of a ‘VerifyingExistingMethodDouble` for the specific case of mocking or stubbing a `new` method on a class. In this case, we substitute the method signature from `#initialize` since new’s signature is just ‘*args`.
Constant Summary
Constants inherited from MethodDouble
MethodDouble::FROZEN_ERROR_MSG
Instance Attribute Summary
Attributes inherited from MethodDouble
#expectations, #method_name, #method_stasher, #object, #stubs
Instance Method Summary collapse
Methods inherited from VerifyingExistingMethodDouble
for, #initialize, #unimplemented?
Methods inherited from VerifyingMethodDouble
#add_expectation, #add_stub, #initialize, #message_expectation_class, #proxy_method_invoked, #validate_arguments!
Methods inherited from MethodDouble
#add_default_stub, #add_expectation, #add_simple_expectation, #add_simple_stub, #add_stub, #build_expectation, #clear, #configure_method, #define_proxy_method, #initialize, #message_expectation_class, #object_singleton_class, #original_implementation_callable, #original_method, #proxy_method_invoked, #raise_method_not_stubbed_error, #remove_stub, #remove_stub_if_present, #reset, #restore_original_method, #restore_original_visibility, #setup_simple_method_double, #show_frozen_warning, #verify, #visibility
Constructor Details
This class inherits a constructor from RSpec::Mocks::VerifyingExistingMethodDouble
Instance Method Details
#with_signature {|Support::MethodSignature.new(object.instance_method(:initialize))| ... } ⇒ Object
216 217 218 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/verifying_proxy.rb', line 216 def with_signature yield Support::MethodSignature.new(object.instance_method(:initialize)) end |