X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fclasses%2Fapt_backports_spec.rb;h=200d6f1333ed8fb50809249b4bbe82c2cb7a9c76;hb=21a2462a58938d126b66985c0b0fa1f8e09f27cd;hp=b9077a6bcd67775a51907f0cb77243f8acf2a7ee;hpb=044fb5faf545f1336c949bd5667da3d5dda2fa1f;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/classes/apt_backports_spec.rb b/spec/classes/apt_backports_spec.rb index b9077a6..200d6f1 100644 --- a/spec/classes/apt_backports_spec.rb +++ b/spec/classes/apt_backports_spec.rb @@ -10,6 +10,7 @@ describe 'apt::backports', :type => :class do :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', + :puppetversion => '3.5.0', } end it { is_expected.to contain_apt__source('backports').with({ @@ -27,6 +28,7 @@ describe 'apt::backports', :type => :class do :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'squeeze', + :puppetversion => '3.5.0', } end it { is_expected.to contain_apt__source('backports').with({ @@ -44,6 +46,7 @@ describe 'apt::backports', :type => :class do :lsbdistid => 'Ubuntu', :osfamily => 'Debian', :lsbdistcodename => 'trusty', + :puppetversion => '3.5.0', } end it { is_expected.to contain_apt__source('backports').with({ @@ -61,6 +64,7 @@ describe 'apt::backports', :type => :class do :lsbdistid => 'Ubuntu', :osfamily => 'Debian', :lsbdistcodename => 'trusty', + :puppetversion => '3.5.0', } end let(:params) do @@ -87,6 +91,7 @@ describe 'apt::backports', :type => :class do :lsbdistid => 'Ubuntu', :osfamily => 'Debian', :lsbdistcodename => 'trusty', + :puppetversion => '3.5.0', } end let(:params) do @@ -112,6 +117,7 @@ describe 'apt::backports', :type => :class do :lsbdistid => 'linuxmint', :osfamily => 'Debian', :lsbdistcodename => 'qiana', + :puppetversion => '3.5.0', } end context 'sets all the needed things' do @@ -142,7 +148,7 @@ describe 'apt::backports', :type => :class do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key/) end end @@ -156,7 +162,7 @@ describe 'apt::backports', :type => :class do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key/) end end @@ -170,7 +176,7 @@ describe 'apt::backports', :type => :class do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key/) end end @@ -184,7 +190,7 @@ describe 'apt::backports', :type => :class do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key/) end end @@ -195,6 +201,7 @@ describe 'apt::backports', :type => :class do :lsbdistid => 'Ubuntu', :osfamily => 'Debian', :lsbdistcodename => 'trusty', + :puppetversion => '3.5.0', } end context 'invalid location' do @@ -205,7 +212,7 @@ describe 'apt::backports', :type => :class do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /is not a string/) end end @@ -217,7 +224,7 @@ describe 'apt::backports', :type => :class do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /is not a string/) end end @@ -229,7 +236,7 @@ describe 'apt::backports', :type => :class do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /is not a string/) end end @@ -241,7 +248,7 @@ describe 'apt::backports', :type => :class do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /is not a string/) end end @@ -253,7 +260,7 @@ describe 'apt::backports', :type => :class do end it do expect { - is_expected.to compile + subject.call }.to raise_error(Puppet::Error, /pin must be either a string, number or hash/) end end