Module: ProtoPharm::Api
- Included in:
- ProtoPharm
- Defined in:
- lib/proto_pharm/api.rb
Instance Method Summary collapse
- #allow_net_connect! ⇒ Object
- #allow_net_connect? ⇒ Boolean
- #disable_net_connect! ⇒ Object
- #request_including(values) ⇒ Object
- #stub_grpc_action(service, rpc_action) ⇒ Object
- #stub_request(path) ⇒ Object
Instance Method Details
#allow_net_connect! ⇒ Object
23 24 25 |
# File 'lib/proto_pharm/api.rb', line 23 def allow_net_connect! GrpcStubAdapter::MockStub.allow_net_connect! end |
#allow_net_connect? ⇒ Boolean
27 28 29 |
# File 'lib/proto_pharm/api.rb', line 27 def allow_net_connect? GrpcStubAdapter::MockStub.allow_net_connect? end |
#disable_net_connect! ⇒ Object
19 20 21 |
# File 'lib/proto_pharm/api.rb', line 19 def disable_net_connect! GrpcStubAdapter::MockStub.disable_net_connect! end |
#request_including(values) ⇒ Object
15 16 17 |
# File 'lib/proto_pharm/api.rb', line 15 def request_including(values) ProtoPharm::Matchers::RequestIncludingMatcher.new(values) end |
#stub_grpc_action(service, rpc_action) ⇒ Object
10 11 12 |
# File 'lib/proto_pharm/api.rb', line 10 def stub_grpc_action(service, rpc_action) ProtoPharm.stub_registry.register_request_stub(ProtoPharm::ActionStub.new(service, rpc_action)) end |
#stub_request(path) ⇒ Object
6 7 8 |
# File 'lib/proto_pharm/api.rb', line 6 def stub_request(path) ProtoPharm.stub_registry.register_request_stub(ProtoPharm::RequestStub.new(path)) end |