Skip to content

Commit 762808f

Browse files
committed
(CONT-773) Lint/ConstantDefinitionInBlock Correction
1 parent 82e0c38 commit 762808f

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

spec/defines/key_compat_spec.rb

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ def apt_key_example(title)
2121
end
2222

2323
describe 'apt::key', type: :define do
24-
let(:title) { '6F6B15509CF8E59E6E469F327F438280EF8D349F' }
25-
let(:pre_condition) { 'include apt' }
24+
let(:key_id) { '6F6B15509CF8E59E6E469F327F438280EF8D349F' }
2625
let(:facts) do
2726
{
2827
os: {
@@ -40,6 +39,14 @@ def apt_key_example(title)
4039
}
4140
end
4241

42+
let :title do
43+
key_id
44+
end
45+
46+
let :pre_condition do
47+
'include apt'
48+
end
49+
4350
describe 'normal operation' do
4451
describe 'default options' do
4552
it {
@@ -62,20 +69,20 @@ def apt_key_example(title)
6269

6370
let :params do
6471
{
65-
id: title
72+
id: key_id
6673
}
6774
end
6875

6976
it 'contains the apt_key' do
70-
expect(subject).to contain_apt_key(title).with(id: title,
77+
expect(subject).to contain_apt_key(title).with(id: key_id,
7178
ensure: 'present',
7279
source: nil,
7380
server: 'keyserver.ubuntu.com',
7481
content: nil)
7582
end
7683

7784
it 'contains the apt_key present anchor' do
78-
expect(subject).to contain_anchor("apt_key #{title} present")
85+
expect(subject).to contain_anchor("apt_key #{key_id} present")
7986
end
8087
end
8188

0 commit comments

Comments
 (0)