X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fpin_spec.rb;h=550d89e4816b67cee6fe586b5c1a7c490448c355;hb=b87e1af3704f5574bda393e36ded542ee7c4be23;hp=9fb28c66523ec3816c24d3b7de57b5115a4b9c49;hpb=3f6863ac4c97f834bebc811852452b073d202682;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/pin_spec.rb b/spec/defines/pin_spec.rb index 9fb28c6..550d89e 100644 --- a/spec/defines/pin_spec.rb +++ b/spec/defines/pin_spec.rb @@ -8,18 +8,16 @@ describe 'apt::pin', :type => :define do context 'defaults' do it { is_expected.to contain_apt__setting("pref-my_pin").with_content(/Explanation: : my_pin\nPackage: \*\nPin: release a=my_pin\nPin-Priority: 0\n/)} - it { is_expected.to contain_apt__setting("pref-my_pin") } end context 'set version' do let :params do { 'packages' => 'vim', - 'version' => '1', + 'version' => "1", } end it { is_expected.to contain_apt__setting("pref-my_pin").with_content(/Explanation: : my_pin\nPackage: vim\nPin: version 1\nPin-Priority: 0\n/)} - it { is_expected.to contain_apt__setting("pref-my_pin") } end context 'set origin' do @@ -30,7 +28,6 @@ describe 'apt::pin', :type => :define do } end it { is_expected.to contain_apt__setting("pref-my_pin").with_content(/Explanation: : my_pin\nPackage: vim\nPin: origin test\nPin-Priority: 0\n/)} - it { is_expected.to contain_apt__setting("pref-my_pin") } end context 'not defaults' do @@ -81,7 +78,7 @@ describe 'apt::pin', :type => :define do it do expect { subject.call - }.to raise_error(Puppet::Error, /Only integers are allowed/) + }.to raise_error(Puppet::Error, /expects a value of type Integer/) end end