Sha256: 573931a0e094bdb37d0a16c3797dead7caf6a103d1f87995206315d0f79198d9

Contents?: true

Size: 606 Bytes

Versions: 13

Compression:

Stored size: 606 Bytes

Contents

# frozen_string_literal: true

require 'grpc_mock/request_stub'
require 'grpc_mock/matchers/request_including_matcher'

module GrpcMock
  module Api
    # @param path [String]
    def stub_request(path)
      GrpcMock.stub_registry.register_request_stub(GrpcMock::RequestStub.new(path))
    end

    # @param values [Hash]
    def request_including(values)
      GrpcMock::Matchers::RequestIncludingMatcher.new(values)
    end

    def disable_net_connect!
      GrpcMock.config.allow_net_connect = false
    end

    def allow_net_connect!
      GrpcMock.config.allow_net_connect = true
    end
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/grpc_mock-0.4.6/lib/grpc_mock/api.rb
grpc_mock-0.4.6 lib/grpc_mock/api.rb
grpc_mock-0.4.5 lib/grpc_mock/api.rb
grpc_mock-0.4.4 lib/grpc_mock/api.rb
grpc_mock-0.4.3 lib/grpc_mock/api.rb
grpc_mock-0.4.2 lib/grpc_mock/api.rb
grpc_mock-0.4.1 lib/grpc_mock/api.rb
gruffish-0.5.0.pre1 lib/grpc_mock/api.rb
grpc_mock-0.4.0 lib/grpc_mock/api.rb
grpc_mock-0.3.1 lib/grpc_mock/api.rb
grpc_mock-0.3.0 lib/grpc_mock/api.rb
grpc_mock-0.2.2 lib/grpc_mock/api.rb
grpc_mock-0.2.1 lib/grpc_mock/api.rb