Skip to content

Commit 46c9475

Browse files
committed
(CONT-773) Rubocop Manual Fix 4 - Performance/CollectionLiteralInLoop
1 parent 9450621 commit 46c9475

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ Metrics/MethodLength:
3232
Metrics/PerceivedComplexity:
3333
Max: 12
3434

35-
# Offense count: 1
36-
# Configuration parameters: MinSize.
37-
Performance/CollectionLiteralInLoop:
38-
Exclude:
39-
- 'spec/classes/apt_update_spec.rb'
40-
4135
# Offense count: 6
4236
# Configuration parameters: Prefixes, AllowedPatterns.
4337
# Prefixes: when, with, without

spec/classes/apt_update_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@
154154

155155
['daily', 'weekly'].each do |update_frequency|
156156
context "when apt::update['frequency'] has the value of #{update_frequency}" do
157-
{ 'we are due for a run' => 1_406_660_561, 'the update-success-stamp file does not exist' => -1 }.each_pair do |desc, factval|
157+
pair = { 'we are due for a run' => 1_406_660_561, 'the update-success-stamp file does not exist' => -1 }
158+
pair.each_pair do |desc, factval|
158159
context "when $apt_update_last_success indicates #{desc}" do
159160
let(:facts) do
160161
{

0 commit comments

Comments
 (0)