Merge pull request #456 from johanfleury/cleaning/template/unattended-upgrades
[puppet-modules/puppetlabs-apt.git] / spec / defines / conf_spec.rb
index 5a81b5148c7d7bf489dabdef47012abe8d58a995..2c1752f074cb301741edc771a4ba3420bae950b0 100644 (file)
@@ -1,5 +1,6 @@
 require 'spec_helper'
 describe 'apt::conf', :type => :define do
+  let(:facts) { { :lsbdistid => 'Debian' } }
   let :title do
     'norecommends'
   end
@@ -16,15 +17,9 @@ describe 'apt::conf', :type => :define do
       "/etc/apt/apt.conf.d/00norecommends"
     end
 
-    it { should contain_apt__conf('norecommends').with({
-         'priority' => '00',
-         'content'  => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n"
-      })
-    }
-
     it { should contain_file(filename).with({
           'ensure'    => 'present',
-          'content'   => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n",
+          'content'   => /Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;/,
           'owner'     => 'root',
           'group'     => 'root',
           'mode'      => '0644',
@@ -47,7 +42,7 @@ describe 'apt::conf', :type => :define do
 
     it { should contain_file(filename).with({
         'ensure'    => 'absent',
-        'content'   => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n",
+        'content'   => /Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;/,
         'owner'     => 'root',
         'group'     => 'root',
         'mode'      => '0644',