context 'with title=pref-teddybear' do
let(:title) { 'pref-teddybear' }
let(:params) { default_params }
- it { is_expected.to contain_file('/etc/apt/preferences.d/50teddybear').that_notifies('Class[Apt::Update]') }
+ it { is_expected.to contain_file('/etc/apt/preferences.d/teddybear.pref').that_notifies('Class[Apt::Update]') }
end
context 'with title=list-teddybear' do
context 'with priority=1.2' do
let(:params) { default_params.merge({ :priority => 1.2 }) }
- it do
- expect { subject.call }.to raise_error(Puppet::Error, /be an integer /)
+ if Puppet::Util::Package.versioncmp(Puppet.version, '4.0') >= 0 || ENV["FUTURE_PARSER"] == 'yes'
+ it { is_expected.to compile.and_raise_error(/input needs to be a String/) }
+ else
+ it { is_expected.to compile.and_raise_error(/priority must be an integer or a zero-padded integer/) }
end
end
end