require 'spec_helper_acceptance'
-describe 'apt::force define' do
+codename = fact('lsbdistcodename')
+
+describe 'apt::force define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
context 'defaults' do
it 'should work with no errors' do
pp = <<-EOS
it 'should work with no errors' do
pp = <<-EOS
include apt
- apt::force { 'vim': release => 'precise' }
+ apt::force { 'vim': release => '#{codename}' }
EOS
shell('apt-get remove -y vim')
apply_manifest(pp, :catch_failures => true) do |r|
- expect(r.stdout).to match(/apt-get -y -t precise install vim/)
+ expect(r.stdout).to match(/apt-get -y -t #{codename} install vim/)
end
end
it 'should work with no errors' do
pp = <<-EOS
include apt
- apt::force { 'tomcat7': timeout => '1' }
+ apt::force { 'ocaml': timeout => '1' }
EOS
shell('apt-get clean')
end
end
- describe package('vim') do
+ describe package('ocaml') do
it { should_not be_installed }
end
end