diff options
author | Muxi Yan <mxyan@google.com> | 2017-10-03 15:49:09 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2017-10-03 15:49:09 -0700 |
commit | 74878c7bf577b4cfea1d2f52ed0661a676961c17 (patch) | |
tree | 8e1dd2f0a4a29e226196cc27c9f443b308dc1022 /src/ruby/spec/compression_options_spec.rb | |
parent | 528369f407d0803c9641dee9ad8ccbbc715c5186 (diff) |
Another Ruby build fix
Diffstat (limited to 'src/ruby/spec/compression_options_spec.rb')
-rw-r--r-- | src/ruby/spec/compression_options_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ruby/spec/compression_options_spec.rb b/src/ruby/spec/compression_options_spec.rb index 03c3cd9f07..dc9c41c580 100644 --- a/src/ruby/spec/compression_options_spec.rb +++ b/src/ruby/spec/compression_options_spec.rb @@ -19,7 +19,7 @@ describe GRPC::Core::CompressionOptions do # according to what the core lib provides. # Names of supported compression algorithms - ALGORITHMS = [:identity, :deflate, :gzip] + ALGORITHMS = [:identity, :message/deflate, :message/gzip] # Names of valid supported compression levels COMPRESS_LEVELS = [:none, :low, :medium, :high] @@ -54,10 +54,10 @@ describe GRPC::Core::CompressionOptions do options = GRPC::Core::CompressionOptions.new( default_algorithm: :identity, default_level: :none, - disabled_algorithms: [:gzip, :deflate] + disabled_algorithms: [:message/gzip, :message/deflate] ) - [:gzip, :deflate].each do |algorithm| + [:message/gzip, :message/deflate].each do |algorithm| expect(options.algorithm_enabled?(algorithm)).to be false expect(options.disabled_algorithms.include?(algorithm)).to be true end @@ -69,16 +69,16 @@ describe GRPC::Core::CompressionOptions do it 'works when all optional args have been set' do options = GRPC::Core::CompressionOptions.new( - default_algorithm: :gzip, + default_algorithm: :message/gzip, default_level: :low, - disabled_algorithms: [:deflate] + disabled_algorithms: [:message/deflate] ) - expect(options.algorithm_enabled?(:deflate)).to be false - expect(options.algorithm_enabled?(:gzip)).to be true - expect(options.disabled_algorithms).to eq([:deflate]) + expect(options.algorithm_enabled?(:message/deflate)).to be false + expect(options.algorithm_enabled?(:message/gzip)).to be true + expect(options.disabled_algorithms).to eq([:message/deflate]) - expect(options.default_algorithm).to be(:gzip) + expect(options.default_algorithm).to be(:message/gzip) expect(options.default_level).to be(:low) expect(options.to_hash).to be_instance_of(Hash) end @@ -102,12 +102,12 @@ describe GRPC::Core::CompressionOptions do describe '#new with bad parameters' do it 'should fail with more than one parameter' do - blk = proc { GRPC::Core::CompressionOptions.new(:gzip, :none) } + blk = proc { GRPC::Core::CompressionOptions.new(:message/gzip, :none) } expect { blk.call }.to raise_error end it 'should fail with a non-hash parameter' do - blk = proc { GRPC::Core::CompressionOptions.new(:gzip) } + blk = proc { GRPC::Core::CompressionOptions.new(:message/gzip) } expect { blk.call }.to raise_error end end @@ -137,7 +137,7 @@ describe GRPC::Core::CompressionOptions do [:none, :any, 'gzip', Object.new, 1].each do |name| it "should fail for parameter ${name} of class #{name.class}" do options = GRPC::Core::CompressionOptions.new( - disabled_algorithms: [:gzip]) + disabled_algorithms: [:message/gzip]) blk = proc do options.algorithm_enabled?(name) |