- let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :apt_update_last_success => Time.now.to_i, :puppetversion => '3.5.0', } }
- let (:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
- it 'should not trigger an apt-get update run' do
- #don't change the apt_update exec\'s refreshonly attribute. (it should be true)
- is_expected.to contain_exec('apt_update').with({'refreshonly' => true})
+ let(:facts) do
+ {
+ os: { family: 'Debian', name: 'Debian', release: { major: '7', full: '7.0' } },
+ lsbdistid: 'Debian',
+ osfamily: 'Debian',
+ lsbdistcodename: 'wheezy',
+ apt_update_last_success: Time.now.to_i,
+ puppetversion: Puppet.version,
+ }
+ end
+ let(:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
+
+ it 'does not trigger an apt-get update run' do
+ # don't change the apt_update exec\'s refreshonly attribute. (it should be true)
+ is_expected.to contain_exec('apt_update').with('refreshonly' => true)