X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fpin_spec.rb;h=9fb28c66523ec3816c24d3b7de57b5115a4b9c49;hb=5e0128cc86bf89c870607c3abbeee8eeb48dc2c5;hp=a11c3b5c253156dcae5b2866286932918f7c99ef;hpb=dc746734f17faa996e8441d176143945e8347330;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/pin_spec.rb b/spec/defines/pin_spec.rb index a11c3b5..9fb28c6 100644 --- a/spec/defines/pin_spec.rb +++ b/spec/defines/pin_spec.rb @@ -3,7 +3,7 @@ describe 'apt::pin', :type => :define do let :pre_condition do 'class { "apt": }' end - let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy' } } + let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } } let(:title) { 'my_pin' } context 'defaults' do @@ -80,7 +80,7 @@ describe 'apt::pin', :type => :define do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /Only integers are allowed/) end end @@ -93,7 +93,7 @@ describe 'apt::pin', :type => :define do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /parameter version cannot be used in general form/) end end @@ -107,7 +107,7 @@ describe 'apt::pin', :type => :define do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /parameters release and origin are mutually exclusive/) end end @@ -122,7 +122,7 @@ describe 'apt::pin', :type => :define do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /parameters release, origin, and version are mutually exclusive/) end end @@ -137,7 +137,7 @@ describe 'apt::pin', :type => :define do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /parameters release, origin, and version are mutually exclusive/) end end