X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fclasses%2Fapt_backports_spec.rb;h=1dfbf3759d61868aa53c75e10f24950b9d6d63d6;hb=7ddd7fd53f0292535928afbf9d90257702a1aff5;hp=5762025eaff44ad5002bc3d58e7ad983f4589084;hpb=e651d7d25c43577738f060d1a2d31a58e273934b;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/classes/apt_backports_spec.rb b/spec/classes/apt_backports_spec.rb index 5762025..1dfbf37 100644 --- a/spec/classes/apt_backports_spec.rb +++ b/spec/classes/apt_backports_spec.rb @@ -7,6 +7,7 @@ describe 'apt::backports', :type => :class do context 'defaults on deb' do let(:facts) do { + :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', @@ -25,6 +26,7 @@ describe 'apt::backports', :type => :class do context 'defaults on squeeze' do let(:facts) do { + :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '6', :full => '6.0' }}, :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'squeeze', @@ -43,6 +45,7 @@ describe 'apt::backports', :type => :class do context 'defaults on ubuntu' do let(:facts) do { + :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, :lsbdistid => 'Ubuntu', :osfamily => 'Debian', :lsbdistcodename => 'trusty', @@ -62,6 +65,7 @@ describe 'apt::backports', :type => :class do context 'set everything' do let(:facts) do { + :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, :lsbdistid => 'Ubuntu', :osfamily => 'Debian', :lsbdistcodename => 'trusty', @@ -90,6 +94,7 @@ describe 'apt::backports', :type => :class do context 'set things with hashes' do let(:facts) do { + :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, :lsbdistid => 'Ubuntu', :osfamily => 'Debian', :lsbdistcodename => 'trusty', @@ -117,6 +122,7 @@ describe 'apt::backports', :type => :class do describe 'mint tests' do let(:facts) do { + :os => { :family => 'Debian', :name => 'Linuxmint', :release => { :major => '17', :full => '17' }}, :lsbdistid => 'linuxmint', :osfamily => 'Debian', :lsbdistcodename => 'qiana', @@ -201,6 +207,7 @@ describe 'apt::backports', :type => :class do describe 'validation' do let(:facts) do { + :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, :lsbdistid => 'Ubuntu', :osfamily => 'Debian', :lsbdistcodename => 'trusty', @@ -217,7 +224,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /is not a string/) + }.to raise_error(Puppet::Error, /expects a/) end end context 'invalid release' do @@ -229,7 +236,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /is not a string/) + }.to raise_error(Puppet::Error, /expects a/) end end context 'invalid repos' do @@ -241,7 +248,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /is not a string/) + }.to raise_error(Puppet::Error, /expects a/) end end context 'invalid key' do @@ -253,7 +260,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /is not a string/) + }.to raise_error(Puppet::Error, /expects a/) end end context 'invalid pin' do @@ -265,7 +272,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /pin must be either a string, number or hash/) + }.to raise_error(Puppet::Error, /expects a/) end end end