bigcommerce/gruf-rspec

Support sending metadata with run_rpc

Closed this issue · 1 comments

define_singleton_method :run_rpc do |method_name, request, &block|
@gruf_controller = described_class.new(
method_key: method_name.to_s.underscore.to_sym,
service: grpc_bound_service,
rpc_desc: grpc_bound_service.rpc_descs[method_name.to_sym],
active_call: grpc_active_call,

May become

define_singleton_method :run_rpc do |method_name, request, options = {}, &block| 
  @gruf_controller = described_class.new( 
    # rest of code
    active_call: grpc_active_call(options), 

How do you think @splittingred ?

Fixed in #6