Module: Gruf::Rspec::Helpers

Defined in:
lib/gruf/rspec/helpers.rb

Overview

Module for including rspec helpers

Instance Method Summary collapse

Instance Method Details

#grpc_active_call(options = {}) ⇒ Double

Returns The mocked call.

Parameters:

  • options (Hash) (defaults to: {})

Returns:

  • (Double)

    The mocked call



28
29
30
31
# File 'lib/gruf/rspec/helpers.rb', line 28

def grpc_active_call(options = {})
  md = (options)
  double(:grpc_active_call, metadata: md, output_metadata: options.fetch(:output_metadata, {}))
end