Skip to content

Commit e6cc0a1

Browse files
committed
Lint/AmbiguousBlockAssociation
1 parent 9ff6a03 commit e6cc0a1

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 2
10-
Lint/AmbiguousBlockAssociation:
11-
Exclude:
12-
- 'spec/mysql2/client_spec.rb'
13-
149
# Offense count: 2
1510
# Cop supports --auto-correct.
1611
Lint/UnifiedInteger:

spec/mysql2/client_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def run_gc
165165
end
166166

167167
it "should terminate connections when calling close" do
168+
# rubocop:disable Lint/AmbiguousBlockAssociation
168169
expect {
169170
client = Mysql2::Client.new(DatabaseCredentials['root'])
170171
connection_id = client.thread_id
@@ -182,10 +183,12 @@ def run_gc
182183
}.to_not change {
183184
@client.query("SHOW STATUS LIKE 'Aborted_%'").to_a
184185
}
186+
# rubocop:enable Lint/AmbiguousBlockAssociation
185187
end
186188

187189
it "should not leave dangling connections after garbage collection" do
188190
run_gc
191+
# rubocop:disable Lint/AmbiguousBlockAssociation
189192
expect {
190193
expect {
191194
10.times do
@@ -200,6 +203,7 @@ def run_gc
200203
@client.query("SHOW STATUS LIKE 'Aborted_%'").to_a +
201204
@client.query("SHOW STATUS LIKE 'Threads_connected'").to_a
202205
}
206+
# rubocop:enable Lint/AmbiguousBlockAssociation
203207
end
204208

205209
context "#automatic_close" do

0 commit comments

Comments
 (0)