lib/grpc_mock.rb in grpc_mock-0.2.0 vs lib/grpc_mock.rb in grpc_mock-0.2.1

- old
+ new

@@ -1,24 +1,30 @@ +# frozen_string_literal: true + +require 'grpc_mock/api' require 'grpc_mock/version' require 'grpc_mock/configuration' require 'grpc_mock/adapter' +require 'grpc_mock/stub_registry' module GrpcMock + extend GrpcMock::Api + class << self def enable! adapter.enable! end def disable! adapter.disable! end - def disable_net_connect! - config.allow_net_connect = false + def reset! + GrpcMock.stub_registry.reset! end - def allow_net_connect! - config.allow_net_connect = true + def stub_registry + @stub_registry ||= GrpcMock::StubRegistry.new end def adapter @adapter ||= Adapter.new end