From: david22swan Date: Fri, 21 Apr 2023 12:35:15 +0000 (+0100) Subject: (CONT-773) Rubocop Manual Fix 1 - RSpec/MultipleExpectations X-Git-Tag: v9.1.0~9^2~13 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=5fede72d6c12749d2fcd8212e937e2cb2453345f;hp=88a921c82338c0116c3cadf0623e67f9dd899a3f;p=puppet-modules%2Fpuppetlabs-apt.git (CONT-773) Rubocop Manual Fix 1 - RSpec/MultipleExpectations --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index b938048..8aff459 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -240,10 +240,6 @@ RSpec/LeakyConstantDeclaration: - 'spec/defines/source_compat_spec.rb' - 'spec/defines/source_spec.rb' -# Offense count: 4 -RSpec/MultipleExpectations: - Max: 5 - # Offense count: 3 # Configuration parameters: AllowSubject. RSpec/MultipleMemoizedHelpers: diff --git a/spec/unit/puppet/provider/apt_key_spec.rb b/spec/unit/puppet/provider/apt_key_spec.rb index b895817..970f7e1 100644 --- a/spec/unit/puppet/provider/apt_key_spec.rb +++ b/spec/unit/puppet/provider/apt_key_spec.rb @@ -43,7 +43,7 @@ OUTPUT ['adv', '--no-tty', '--list-keys', '--with-colons', '--fingerprint', '--fixed-list-mode'], ).and_return(command_output) end - it 'returns 2 resources' do + it 'returns 2 resources' do # rubocop:disable RSpec/MultipleExpectations expect(described_class.instances.size).to eq(2) expect(described_class.instances[0].name).to eq('630239CC130E1A7FD81A27B140976EAF437D05B5') expect(described_class.instances[0].id).to eq('40976EAF437D05B5') @@ -88,7 +88,7 @@ OUTPUT expect(provider).to be_exist end - it 'apt_key with content set' do + it 'apt_key with content set' do # rubocop:disable RSpec/MultipleExpectations expect(described_class).to receive(:apt_key).with(array_including('add', kind_of(String))) resource = Puppet::Type::Apt_key.new(name: 'gsd', id: 'C105B9DE', @@ -102,7 +102,7 @@ OUTPUT expect(provider).to be_exist end - it 'apt_key with source set' do + it 'apt_key with source set' do # rubocop:disable RSpec/MultipleExpectations expect(described_class).to receive(:apt_key).with(array_including('add', kind_of(String))) resource = Puppet::Type::Apt_key.new(name: 'gsd', id: 'C105B9DE', @@ -116,7 +116,7 @@ OUTPUT expect(provider).to be_exist end - it 'apt_key with source and weak ssl verify set' do + it 'apt_key with source and weak ssl verify set' do # rubocop:disable RSpec/MultipleExpectations expect(described_class).to receive(:apt_key).with(array_including('add', kind_of(String))) resource = Puppet::Type::Apt_key.new(name: 'gsd', id: 'C105B9DE',