aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/spec/client_server_spec.rb
diff options
context:
space:
mode:
authorGravatar Tim Emiola <temiola@google.com>2015-04-14 09:42:09 -0700
committerGravatar Tim Emiola <temiola@google.com>2015-04-14 09:42:09 -0700
commit1e0981262c200e650671e2f6c2d0255330fbd5ec (patch)
tree1369e0e4ce3e8954a2b4571ca07a243f173d6a33 /src/ruby/spec/client_server_spec.rb
parent4bda5e39b9a533acdb72a80920c3389e50ff97a8 (diff)
Correct style errors identified by the latest version of RuboCop
Diffstat (limited to 'src/ruby/spec/client_server_spec.rb')
-rw-r--r--src/ruby/spec/client_server_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ruby/spec/client_server_spec.rb b/src/ruby/spec/client_server_spec.rb
index 1a2afbe1f9..68af79f907 100644
--- a/src/ruby/spec/client_server_spec.rb
+++ b/src/ruby/spec/client_server_spec.rb
@@ -192,11 +192,11 @@ shared_examples 'GRPC metadata delivery works OK' do
describe 'from client => server' do
before(:example) do
n = 7 # arbitrary number of metadata
- diff_keys_fn = proc { |i| [sprintf('k%d', i), sprintf('v%d', i)] }
+ diff_keys_fn = proc { |i| [format('k%d', i), format('v%d', i)] }
diff_keys = Hash[n.times.collect { |x| diff_keys_fn.call x }]
- null_vals_fn = proc { |i| [sprintf('k%d', i), sprintf('v\0%d', i)] }
+ null_vals_fn = proc { |i| [format('k%d', i), format('v\0%d', i)] }
null_vals = Hash[n.times.collect { |x| null_vals_fn.call x }]
- same_keys_fn = proc { |i| [sprintf('k%d', i), [sprintf('v%d', i)] * n] }
+ same_keys_fn = proc { |i| [format('k%d', i), [format('v%d', i)] * n] }
same_keys = Hash[n.times.collect { |x| same_keys_fn.call x }]
symbol_key = { a_key: 'a val' }
@valid_metadata = [diff_keys, same_keys, null_vals, symbol_key]
@@ -242,11 +242,11 @@ shared_examples 'GRPC metadata delivery works OK' do
describe 'from server => client' do
before(:example) do
n = 7 # arbitrary number of metadata
- diff_keys_fn = proc { |i| [sprintf('k%d', i), sprintf('v%d', i)] }
+ diff_keys_fn = proc { |i| [format('k%d', i), format('v%d', i)] }
diff_keys = Hash[n.times.collect { |x| diff_keys_fn.call x }]
- null_vals_fn = proc { |i| [sprintf('k%d', i), sprintf('v\0%d', i)] }
+ null_vals_fn = proc { |i| [format('k%d', i), format('v\0%d', i)] }
null_vals = Hash[n.times.collect { |x| null_vals_fn.call x }]
- same_keys_fn = proc { |i| [sprintf('k%d', i), [sprintf('v%d', i)] * n] }
+ same_keys_fn = proc { |i| [format('k%d', i), [format('v%d', i)] * n] }
same_keys = Hash[n.times.collect { |x| same_keys_fn.call x }]
symbol_key = { a_key: 'a val' }
@valid_metadata = [diff_keys, same_keys, null_vals, symbol_key]