Metrics/PerceivedComplexity:
Max: 12
-# Offense count: 6
-# Configuration parameters: Prefixes, AllowedPatterns.
-# Prefixes: when, with, without
-RSpec/ContextWording:
- Exclude:
- - 'spec/classes/apt_spec.rb'
- - 'spec/classes/apt_update_spec.rb'
- - 'spec/unit/puppet/provider/apt_key_spec.rb'
-
# Offense count: 32
# Configuration parameters: IgnoredMetadata.
RSpec/DescribeClass:
end
end
- context 'self.instances no key' do
+ context 'with self.instances no key' do
before :each do
# Unable to remove `master` from below terminology as it relies on outside code
allow(described_class).to receive(:apt_key).with(
end
end
- context 'self.instances multiple keys' do
+ context 'with self.instances multiple keys' do
before :each do
command_output = <<~OUTPUT
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.DU0GdRxjmE --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/puppetlabs-pc1-keyring.gpg --no-tty --list-keys --with-colons --fingerprint --fixed-list-mode
end
end
- context 'create apt_key resource' do
+ context 'with create apt_key resource' do
it 'apt_key with content set and source nil' do
expect(described_class).to receive(:apt_key).with(['adv', '--no-tty',
'--keyserver',
end
end
- context 'key_line_hash function' do
+ context 'with key_line_hash function' do
it 'matches rsa' do
expect(described_class.key_line_hash('pub:-:1024:1:40976EAF437D05B5:1095016255:::-:::scESC:', 'fpr:::::::::630239CC130E1A7FD81A27B140976EAF437D05B5:')).to include(
key_expiry: nil,