Metrics/PerceivedComplexity:
Max: 12
-# Offense count: 1
-# Configuration parameters: MinSize.
-Performance/CollectionLiteralInLoop:
- Exclude:
- - 'spec/classes/apt_update_spec.rb'
-
# Offense count: 6
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
['daily', 'weekly'].each do |update_frequency|
context "when apt::update['frequency'] has the value of #{update_frequency}" do
- { 'we are due for a run' => 1_406_660_561, 'the update-success-stamp file does not exist' => -1 }.each_pair do |desc, factval|
+ pair = { 'we are due for a run' => 1_406_660_561, 'the update-success-stamp file does not exist' => -1 }
+ pair.each_pair do |desc, factval|
context "when $apt_update_last_success indicates #{desc}" do
let(:facts) do
{