Skip to content

Commit 7f3f059

Browse files
committed
Remove warnings in transport unit tests
1 parent 789bafa commit 7f3f059

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

elasticsearch-transport/test/unit/connection_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ class Elasticsearch::Transport::Transport::Connections::ConnectionTest < Minites
6464

6565
should "have a string representation" do
6666
c = Connection.new :host => 'x'
67-
assert_match /host: x/, c.to_s
68-
assert_match /alive/, c.to_s
67+
assert_match(/host: x/, c.to_s)
68+
assert_match(/alive/, c.to_s)
6969
end
7070

7171
should "not be dead by default" do

elasticsearch-transport/test/unit/transport_base_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def initialize(*); end
429429
@transport.stubs(:get_connection).returns(fake_connection)
430430

431431
@transport.logger.expects(:info).with do |message|
432-
assert_match /http:\/\/user:\*{1,15}@localhost\:9200/, message
432+
assert_match(/http:\/\/user:\*{1,15}@localhost\:9200/, message)
433433
true
434434
end
435435

elasticsearch-transport/test/unit/transport_faraday_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class Elasticsearch::Transport::Transport::HTTP::FaradayTest < Minitest::Test
149149

150150
transport.connections.first.connection.expects(:run_request).
151151
with do |method, url, params, body|
152-
assert_match /\?format=yaml/, url
152+
assert_match(/\?format=yaml/, url)
153153
true
154154
end.
155155
returns(stub_everything)
@@ -167,7 +167,7 @@ class Elasticsearch::Transport::Transport::HTTP::FaradayTest < Minitest::Test
167167

168168
transport.connections.first.connection.expects(:run_request).
169169
with do |method, url, params, body|
170-
assert_match /\?format=json/, url
170+
assert_match(/\?format=json/, url)
171171
true
172172
end.
173173
returns(stub_everything)

elasticsearch-transport/test/unit/transport_manticore_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ class Elasticsearch::Transport::Transport::HTTP::ManticoreTest < Minitest::Test
145145
transport = Manticore.new :hosts => [ { :host => 'foobar', :port => 1234 } ], :options => options
146146
transport.connections.first.connection
147147
.expects(:get)
148-
.with do |host, options|
149-
assert_equal 'myapp-0.0', options[:headers]['User-Agent']
148+
.with do |host, _options|
149+
assert_equal 'myapp-0.0', _options[:headers]['User-Agent']
150150
true
151151
end
152152
.returns(stub_everything)

0 commit comments

Comments
 (0)