Using rspec filters works better
authorHunter Haugen <hunter@puppetlabs.com>
Fri, 21 Feb 2014 19:45:21 +0000 (11:45 -0800)
committerHunter Haugen <hunter@puppetlabs.com>
Fri, 21 Feb 2014 19:45:21 +0000 (11:45 -0800)
And this will make merging back to master cleaner

spec/acceptance/apt_ppa_spec.rb
spec/spec_helper_acceptance.rb

index 60e6d4d4b2e605f8fc3859bdaa5b6021b31d89c2..5948461421322e40142a81d27844d03554943aba 100644 (file)
@@ -70,31 +70,29 @@ if fact('operatingsystem') == 'Ubuntu'
       end
     end
 
-    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
+    context 'options' do
+      context '-y', :unless => default[:platform].match(/10\.04/) 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
-      end
 
-      context 'reset' do
-        it { shell('rm -rf /etc/apt/sources.list.d/canonical-kernel-team-ppa*', :acceptable_exit_codes => [0,1,2]) }
+        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
   end
 end
index 37afbfc1b750cd35c3eff86884f9c2d09e8eb005..142e4a6734e0e675dc6f47131239437fff90c4a0 100644 (file)
@@ -12,8 +12,6 @@ unless ENV['RS_PROVISION'] == 'no'
   end
 end
 
-UNSUPPORTED_PLATFORMS = ['windows','aix','solaris',/el-(4|5|6)/]
-
 RSpec.configure do |c|
   # Project root
   proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))