let :default_params do
{
+ :ensure => 'present',
:packages => '*',
:priority => '0'
}
end
- [{},
- {
+ [ {},
+ {
+ :packages => 'apache',
+ :priority => '1'
+ },
+ {
+ :ensure => 'absent',
:packages => 'apache',
:priority => '1'
}
it { should include_class("apt::params") }
it { should contain_file("#{title}.pref").with({
- 'ensure' => 'file',
+ 'ensure' => param_hash[:ensure],
'path' => "/etc/apt/preferences.d/#{title}",
'owner' => 'root',
'group' => 'root',