Module: RSpec::Mocks::VerifyingProxyMethods
- Included in:
- VerifyingPartialDoubleProxy, VerifyingProxy
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/verifying_proxy.rb
Instance Method Summary collapse
- #add_message_expectation(method_name, opts = {}, &block) ⇒ Object
- #add_simple_stub(method_name, *args) ⇒ Object
- #add_stub(method_name, opts = {}, &implementation) ⇒ Object
- #ensure_implemented(method_name) ⇒ Object
- #ensure_publicly_implemented(method_name, _object) ⇒ Object
Instance Method Details
#add_message_expectation(method_name, opts = {}, &block) ⇒ Object
33 34 35 36 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/verifying_proxy.rb', line 33 def (method_name, opts={}, &block) ensure_implemented(method_name) super end |
#add_simple_stub(method_name, *args) ⇒ Object
28 29 30 31 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/verifying_proxy.rb', line 28 def add_simple_stub(method_name, *args) ensure_implemented(method_name) super end |
#add_stub(method_name, opts = {}, &implementation) ⇒ Object
23 24 25 26 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/verifying_proxy.rb', line 23 def add_stub(method_name, opts={}, &implementation) ensure_implemented(method_name) super end |
#ensure_implemented(method_name) ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/verifying_proxy.rb', line 38 def ensure_implemented(method_name) return unless method_reference[method_name].unimplemented? @error_generator.raise_unimplemented_error( @doubled_module, method_name, @object ) end |
#ensure_publicly_implemented(method_name, _object) ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/verifying_proxy.rb', line 48 def ensure_publicly_implemented(method_name, _object) ensure_implemented(method_name) visibility = method_reference[method_name].visibility return if visibility == :public @error_generator.raise_non_public_error(method_name, visibility) end |