- context 'reset' do
- it 'removes added ppas' do
- shell('rm /etc/apt/sources.list.d/canonical-kernel-team-ppa-*')
- shell('rm /etc/apt/sources.list.d/raravena80-collectd5-*')
+ if ! default[:platform].match(/10\.04/)
+ context 'options' do
+ context '-y' do
+ it 'works without failure' do
+ pp = <<-EOS
+ include '::apt'
+ apt::ppa { 'ppa:canonical-kernel-team/ppa':
+ release => precise,
+ options => '-y',
+ }
+ EOS
+
+ shell('rm -rf /etc/apt/sources.list.d/canonical-kernel-team-ppa*', :acceptable_exit_codes => [0,1,2])
+ apply_manifest(pp, :catch_failures => true)
+ end
+
+ describe file('/etc/apt/sources.list.d/canonical-kernel-team-ppa-precise.list') do
+ it { should be_file }
+ end
+ end
+ end
+
+ context 'reset' do
+ it { shell('rm -rf /etc/apt/sources.list.d/canonical-kernel-team-ppa*', :acceptable_exit_codes => [0,1,2]) }
+ end