X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fmark_spec.rb;h=e73901e95a347189e41762543ab292e2a2673ceb;hb=refs%2Fheads%2Ftrusted-contributors;hp=5375fe236f4e8c9ca3eb7cc564373f40372837ef;hpb=fad371f806411bdc003ce367c3d54fd15417036d;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/mark_spec.rb b/spec/defines/mark_spec.rb index 5375fe2..e73901e 100644 --- a/spec/defines/mark_spec.rb +++ b/spec/defines/mark_spec.rb @@ -14,37 +14,37 @@ describe 'apt::mark', type: :define do name: 'Debian', release: { major: '9', - full: '9.0', + full: '9.0' }, distro: { codename: 'stretch', - id: 'Debian', - }, - }, + id: 'Debian' + } + } } end context 'with correct seting' do let :params do { - 'setting' => 'manual', + 'setting' => 'manual' } end it { - is_expected.to contain_exec('apt-mark manual mysource') + expect(subject).to contain_exec('apt-mark manual mysource') } end describe 'with wrong setting' do let :params do { - 'setting' => 'foobar', + 'setting' => 'foobar' } end it do - is_expected.to raise_error(Puppet::PreformattedError, %r{expects a match for Enum\['auto', 'hold', 'manual', 'unhold'\], got 'foobar'}) + expect(subject).to raise_error(Puppet::PreformattedError, %r{expects a match for Enum\['auto', 'hold', 'manual', 'unhold'\], got 'foobar'}) end end @@ -65,12 +65,12 @@ describe 'apt::mark', type: :define do let :params do { - 'setting' => 'manual', + 'setting' => 'manual' } end it do - is_expected.to contain_exec("apt-mark manual #{title}") + expect(subject).to contain_exec("apt-mark manual #{title}") end end end @@ -94,12 +94,12 @@ describe 'apt::mark', type: :define do let :params do { - 'setting' => 'manual', + 'setting' => 'manual' } end it do - is_expected.to raise_error(Puppet::PreformattedError, %r{Invalid package name: #{title}}) + expect(subject).to raise_error(Puppet::PreformattedError, %r{Invalid package name: #{title}}) end end end