File tree Expand file tree Collapse file tree 4 files changed +6
-15
lines changed Expand file tree Collapse file tree 4 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,6 @@ Metrics/MethodLength:
3232Metrics/PerceivedComplexity :
3333 Max : 12
3434
35- # Offense count: 6
36- # Configuration parameters: Prefixes, AllowedPatterns.
37- # Prefixes: when, with, without
38- RSpec/ContextWording :
39- Exclude :
40- - ' spec/classes/apt_spec.rb'
41- - ' spec/classes/apt_update_spec.rb'
42- - ' spec/unit/puppet/provider/apt_key_spec.rb'
43-
4435# Offense count: 32
4536# Configuration parameters: IgnoredMetadata.
4637RSpec/DescribeClass :
Original file line number Diff line number Diff line change 389389 }
390390
391391 facts_hash . each do |os , facts |
392- context "on #{ os } " do
392+ context "when on #{ os } " do
393393 let ( :facts ) do
394394 facts
395395 end
Original file line number Diff line number Diff line change 6262 end
6363 end
6464
65- context 'and Exec[apt_update] refreshonly is overridden to true and has recent run' do
65+ context 'when Exec[apt_update] refreshonly is overridden to true and has recent run' do
6666 let ( :facts ) do
6767 {
6868 os : {
Original file line number Diff line number Diff line change 1515 end
1616 end
1717
18- context 'self.instances no key' do
18+ context 'with self.instances no key' do
1919 before :each do
2020 # Unable to remove `master` from below terminology as it relies on outside code
2121 allow ( described_class ) . to receive ( :apt_key ) . with (
2828 end
2929 end
3030
31- context 'self.instances multiple keys' do
31+ context 'with self.instances multiple keys' do
3232 before :each do
3333 command_output = <<~OUTPUT
3434 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
5454 end
5555 end
5656
57- context 'create apt_key resource' do
57+ context 'with create apt_key resource' do
5858 it 'apt_key with content set and source nil' do
5959 expect ( described_class ) . to receive ( :apt_key ) . with ( [ 'adv' , '--no-tty' ,
6060 '--keyserver' ,
172172 end
173173 end
174174
175- context 'key_line_hash function' do
175+ context 'with key_line_hash function' do
176176 it 'matches rsa' do
177177 expect ( described_class . key_line_hash ( 'pub:-:1024:1:40976EAF437D05B5:1095016255:::-:::scESC:' , 'fpr:::::::::630239CC130E1A7FD81A27B140976EAF437D05B5:' ) ) . to include (
178178 key_expiry : nil ,
You can’t perform that action at this time.
0 commit comments