Module: GrpcMock
- Extended by:
- Api
- Defined in:
- lib/grpc_mock.rb,
lib/grpc_mock/api.rb,
lib/grpc_mock/errors.rb,
lib/grpc_mock/adapter.rb,
lib/grpc_mock/version.rb,
lib/grpc_mock/response.rb,
lib/grpc_mock/request_stub.rb,
lib/grpc_mock/configuration.rb,
lib/grpc_mock/stub_registry.rb,
lib/grpc_mock/request_pattern.rb,
lib/grpc_mock/grpc_stub_adapter.rb,
lib/grpc_mock/response_sequence.rb,
lib/grpc_mock/matchers/hash_argument_matcher.rb,
lib/grpc_mock/matchers/request_including_matcher.rb
Defined Under Namespace
Modules: Api, Matchers, Response
Classes: Adapter, Configuration, GrpcStubAdapter, NetConnectNotAllowedError, NoResponseError, RequestPattern, RequestStub, ResponsesSequence, StubRegistry
Constant Summary
collapse
- VERSION =
'0.4.1'
Class Method Summary
collapse
Methods included from Api
allow_net_connect!, disable_net_connect!, request_including, stub_request
Class Method Details
.adapter ⇒ Object
29
30
31
|
# File 'lib/grpc_mock.rb', line 29
def adapter
@adapter ||= Adapter.new
end
|
.config ⇒ Object
33
34
35
|
# File 'lib/grpc_mock.rb', line 33
def config
@config ||= Configuration.new
end
|
.disable! ⇒ Object
17
18
19
|
# File 'lib/grpc_mock.rb', line 17
def disable!
adapter.disable!
end
|
.enable! ⇒ Object
13
14
15
|
# File 'lib/grpc_mock.rb', line 13
def enable!
adapter.enable!
end
|
.reset! ⇒ Object
21
22
23
|
# File 'lib/grpc_mock.rb', line 21
def reset!
GrpcMock.stub_registry.reset!
end
|
.stub_registry ⇒ Object
25
26
27
|
# File 'lib/grpc_mock.rb', line 25
def stub_registry
@stub_registry ||= GrpcMock::StubRegistry.new
end
|