make ruby unit tests work on ruby 3 (#30603)

pull/30621/head
apolcyn 2 years ago committed by GitHub
parent 1b8f7b1c79
commit b2be531018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ruby/spec/generic/server_interceptors_spec.rb
  2. 2
      src/ruby/spec/user_agent_spec.rb

@ -17,7 +17,7 @@ describe 'Server Interceptors' do
let(:interceptor) { TestServerInterceptor.new }
let(:request) { EchoMsg.new }
let(:trailing_metadata) { {} }
let(:service) { EchoService.new(trailing_metadata) }
let(:service) { EchoService.new(**trailing_metadata) }
let(:interceptors) { [] }
before(:each) do

@ -49,7 +49,7 @@ describe 'user agent' do
it 'client sends expected user agent' do
stub = UserAgentEchoServiceStub.new("localhost:#{@port}",
:this_channel_is_insecure,
{})
channel_args: {})
response = stub.an_rpc(EchoMsg.new)
expected_user_agent_prefix = "grpc-ruby/#{GRPC::VERSION}"
expect(response.msg.start_with?(expected_user_agent_prefix)).to be true

Loading…
Cancel
Save