X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fsetting_spec.rb;h=2d7041459b075182f8ab7b577833f7fff452bf54;hb=630580d1ce3c609865e31598198e7c55dda9a6ef;hp=0b6ca99b60eadb5f706c4da31f6d51b257f4d2f8;hpb=2b536b6a200e8f4f7f7ae37ec091abd06ca4cb70;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/setting_spec.rb b/spec/defines/setting_spec.rb index 0b6ca99..2d70414 100644 --- a/spec/defines/setting_spec.rb +++ b/spec/defines/setting_spec.rb @@ -4,9 +4,9 @@ describe 'apt::setting' do let(:pre_condition) { 'class { "apt": }' } let :facts do { - os: { distro: { codename: 'wheezy' }, family: 'Debian', name: 'Debian', release: { major: '7', full: '7.0' } }, - lsbdistrelease: '7.0', - lsbdistcodename: 'wheezy', + os: { distro: { codename: 'wheezy' }, family: 'Debian', name: 'Debian', release: { major: '8', full: '8.0' } }, + lsbdistrelease: '8.0', + lsbdistcodename: 'jessie', operatingsystem: 'Debian', osfamily: 'Debian', lsbdistid: 'Debian', @@ -20,7 +20,7 @@ describe 'apt::setting' do describe 'when using the defaults' do context 'without source or content' do it do - expect { subject.call }.to raise_error(Puppet::Error, %r{needs either of }) + is_expected.to raise_error(Puppet::Error, %r{needs either of }) end end @@ -77,10 +77,10 @@ describe 'apt::setting' do end let(:facts) do { - os: { family: 'Debian', name: 'Debian', release: { major: '7', full: '7.0' } }, + os: { family: 'Debian', name: 'Debian', release: { major: '8', full: '8.0' } }, lsbdistid: 'Debian', osfamily: 'Debian', - lsbdistcodename: 'wheezy', + lsbdistcodename: 'jessie', puppetversion: Puppet.version, } end @@ -97,7 +97,7 @@ describe 'apt::setting' do let(:params) { default_params.merge(source: 'la') } it do - expect { subject.call }.to raise_error(Puppet::Error, %r{cannot have both }) + is_expected.to raise_error(Puppet::Error, %r{cannot have both }) end end @@ -106,7 +106,7 @@ describe 'apt::setting' do let(:params) { default_params } it do - expect { subject.call }.to raise_error(Puppet::Error, %r{must start with either}) + is_expected.to raise_error(Puppet::Error, %r{must start with either}) end end @@ -114,7 +114,7 @@ describe 'apt::setting' do let(:params) { default_params.merge(ensure: 'banana') } it do - expect { subject.call }.to raise_error(Puppet::Error, %r{Enum\['absent', 'file', 'present'\]}) + is_expected.to raise_error(Puppet::Error, %r{Enum\['absent', 'file', 'present'\]}) end end