Add test case to ensure graceful failure on OSX.

This commit is contained in:
Morgan Haskel 2014-06-11 13:31:53 -04:00
parent ade6c33dd2
commit 1e1c8b287a

View file

@ -54,4 +54,16 @@ describe 'apt' do
it { should contain_file('puppetlabs.list').with_content(/^deb http:\/\/apt.puppetlabs.com precise main$/) }
it { should contain_file('puppetlabs.list').with_content(/^deb-src http:\/\/apt.puppetlabs.com precise main$/) }
end
context 'with unsupported osfamily' do
let :facts do
{ :osfamily => 'Darwin', }
end
it do
expect {
should compile
}.to raise_error(Puppet::Error, /This module only works on Debian or derivatives like Ubuntu/)
end
end
end