Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Release prep v8.0.2
[puppet-modules/puppetlabs-apt.git]
/
spec
/
defines
/
conf_spec.rb
diff --git
a/spec/defines/conf_spec.rb
b/spec/defines/conf_spec.rb
index 1296e999f89c283ce602a3b5bde5f51a99772cd9..310e15ad5e67a20d41964b001cadf353949dd500 100644
(file)
--- a/
spec/defines/conf_spec.rb
+++ b/
spec/defines/conf_spec.rb
@@
-1,3
+1,5
@@
+# frozen_string_literal: true
+
require 'spec_helper'
describe 'apt::conf', type: :define do
let :pre_condition do
require 'spec_helper'
describe 'apt::conf', type: :define do
let :pre_condition do
@@
-5,11
+7,18
@@
describe 'apt::conf', type: :define do
end
let(:facts) do
{
end
let(:facts) do
{
- os: { family: 'Debian', name: 'Debian', release: { major: '7', full: '7.0' } },
- lsbdistid: 'Debian',
- osfamily: 'Debian',
- lsbdistcodename: 'wheezy',
- puppetversion: Puppet.version,
+ os: {
+ family: 'Debian',
+ name: 'Debian',
+ release: {
+ major: '8',
+ full: '8.0',
+ },
+ distro: {
+ codename: 'jessie',
+ id: 'Debian',
+ },
+ },
}
end
let :title do
}
end
let :title do
@@
-35,8
+44,7
@@
describe 'apt::conf', type: :define do
is_expected.to contain_file(filename).with('ensure' => 'present',
'content' => %r{Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;},
'owner' => 'root',
is_expected.to contain_file(filename).with('ensure' => 'present',
'content' => %r{Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;},
'owner' => 'root',
- 'group' => 'root',
- 'mode' => '0644')
+ 'group' => 'root')
}
context 'with notify_update = true (default)' do
}
context 'with notify_update = true (default)' do
@@
-64,7
+72,7
@@
describe 'apt::conf', type: :define do
end
it 'fails' do
end
it 'fails' do
-
expect { subject.call }
.to raise_error(%r{pass in content})
+
is_expected
.to raise_error(%r{pass in content})
end
end
end
end
@@
-83,8
+91,7
@@
describe 'apt::conf', type: :define do
it {
is_expected.to contain_file(filename).with('ensure' => 'absent',
'owner' => 'root',
it {
is_expected.to contain_file(filename).with('ensure' => 'absent',
'owner' => 'root',
- 'group' => 'root',
- 'mode' => '0644')
+ 'group' => 'root')
}
end
end
}
end
end