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
Merge pull request #435 from mhaskel/setting_fix
[puppet-modules/puppetlabs-apt.git]
/
spec
/
defines
/
setting_spec.rb
diff --git
a/spec/defines/setting_spec.rb
b/spec/defines/setting_spec.rb
index 7368ec3a161aedf7433be6010a79213c223a1957..3736dc9641e2d9238f51c9dcdacb1d36cc565030 100644
(file)
--- a/
spec/defines/setting_spec.rb
+++ b/
spec/defines/setting_spec.rb
@@
-5,39
+5,39
@@
describe 'apt::setting' do
let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian' } }
let(:title) { 'teddybear' }
let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian' } }
let(:title) { 'teddybear' }
- let(:default_params) { { :type => 'conf', :content => 'di' } }
+ let(:default_params) { { :
setting_
type => 'conf', :content => 'di' } }
describe 'when using the defaults' do
describe 'when using the defaults' do
- context 'without type' do
+ context 'without
setting_
type' do
it do
it do
- expect { should compile }.to raise_error(Puppet::Error, /Must pass type /)
+ expect { should compile }.to raise_error(Puppet::Error, /Must pass
setting_
type /)
end
end
context 'without source or content' do
end
end
context 'without source or content' do
- let(:params) { { :type => 'conf' } }
+ let(:params) { { :
setting_
type => 'conf' } }
it do
expect { should compile }.to raise_error(Puppet::Error, /needs either of /)
end
end
it do
expect { should compile }.to raise_error(Puppet::Error, /needs either of /)
end
end
- context 'with type=conf' do
+ context 'with
setting_
type=conf' do
let(:params) { default_params }
it { should contain_file('/etc/apt/apt.conf.d/50teddybear') }
end
let(:params) { default_params }
it { should contain_file('/etc/apt/apt.conf.d/50teddybear') }
end
- context 'with type=pref' do
- let(:params) { { :type => 'pref', :content => 'di' } }
+ context 'with
setting_
type=pref' do
+ let(:params) { { :
setting_
type => 'pref', :content => 'di' } }
it { should contain_file('/etc/apt/preferences.d/50teddybear') }
end
it { should contain_file('/etc/apt/preferences.d/50teddybear') }
end
- context 'with type=list' do
- let(:params) { { :type => 'list', :content => 'di' } }
+ context 'with
setting_
type=list' do
+ let(:params) { { :
setting_
type => 'list', :content => 'di' } }
it { should contain_file('/etc/apt/sources.list.d/teddybear.list') }
end
context 'with source' do
it { should contain_file('/etc/apt/sources.list.d/teddybear.list') }
end
context 'with source' do
- let(:params) { { :type => 'conf', :source => 'puppet:///la/die/dah' } }
+ let(:params) { { :
setting_
type => 'conf', :source => 'puppet:///la/die/dah' } }
it {
should contain_file('/etc/apt/apt.conf.d/50teddybear').with({
:ensure => 'file',
it {
should contain_file('/etc/apt/apt.conf.d/50teddybear').with({
:ensure => 'file',
@@
-68,8
+68,8
@@
describe 'apt::setting' do
end
end
end
end
- context 'with type=ext' do
- let(:params) { default_params.merge({ :type => 'ext' }) }
+ context 'with
setting_
type=ext' do
+ let(:params) { default_params.merge({ :
setting_
type => 'ext' }) }
it do
expect { should compile }.to raise_error(Puppet::Error, /"ext" does not /)
end
it do
expect { should compile }.to raise_error(Puppet::Error, /"ext" does not /)
end