(CONT-773) Rubocop Manual Fix 3 - Lint/ConstantDefinitionInBlock
[puppet-modules/puppetlabs-apt.git] / spec / defines / source_compat_spec.rb
index a414c493862c2067ea6d427eca24b986d803e815..55be585aa63918a02ceb5c7f649bbd5a8c8e3cc8 100644 (file)
@@ -3,12 +3,8 @@
 require 'spec_helper'
 
 describe 'apt::source', type: :define do
-  GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F'
-
-  let :title do
-    'my_source'
-  end
-
+  let(:id) { '6F6B15509CF8E59E6E469F327F438280EF8D349F' }
+  let(:title) { 'my_source' }
   let :facts do
     {
       os: {
@@ -47,7 +43,7 @@ describe 'apt::source', type: :define do
         'release' => 'sid',
         'repos' => 'testing',
         'include' => { 'src' => false },
-        'key' => GPG_KEY_ID,
+        'key' => id,
         'pin' => '10',
         'architecture' => 'x86_64',
         'allow_unsigned' => true
@@ -66,8 +62,8 @@ describe 'apt::source', type: :define do
     }
 
     it {
-      expect(subject).to contain_apt__key("Add key: #{GPG_KEY_ID} from Apt::Source my_source").that_comes_before('Apt::Setting[list-my_source]').with('ensure' => 'present',
-                                                                                                                                                      'id' => GPG_KEY_ID)
+      expect(subject).to contain_apt__key("Add key: #{id} from Apt::Source my_source").that_comes_before('Apt::Setting[list-my_source]').with('ensure' => 'present',
+                                                                                                                                              'id' => id)
     }
   end