Sometimes killing apt is too aggressive.
[puppet-modules/puppetlabs-apt.git] / spec / acceptance / apt_spec.rb
index 4daab09b7bd3852bd759458de6268fcf4ed87eb2..97f00f1681abd418ebe5d00261b5d2556d7d5aef 100644 (file)
@@ -15,7 +15,7 @@ describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')
       EOS
 
       apply_manifest(pp, :catch_failures => true) do |r|
-        expect(r.stdout).to match(/apt_update/)
+        expect(r.stdout).to match(/Exec\[apt_update\]/)
       end
     end
   end
@@ -26,7 +26,7 @@ describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')
       EOS
 
       apply_manifest(pp, :catch_failures => true) do |r|
-        expect(r.stdout).to_not match(/apt_update/)
+        expect(r.stdout).to_not match(/Exec\[apt_update\]/)
       end
     end
   end
@@ -217,10 +217,7 @@ describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')
       end
 
       describe file('/etc/apt/preferences') do
-        it { should be_file }
-        it 'is managed by Puppet' do
-          shell("grep 'Explanation' /etc/apt/preferences", {:acceptable_exit_codes => 0})
-        end
+        it { should_not be_file }
       end
     end
   end