X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fsetting_spec.rb;h=1a94de78f41f62f8e3bcfb177173f0546d090114;hb=4d21aebedd1160fbfbdce2b33f62109d87dd2aea;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..1a94de7 100644 --- a/spec/defines/setting_spec.rb +++ b/spec/defines/setting_spec.rb @@ -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 @@ -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