Merge pull request #326 from dabido/master
[puppet-modules/puppetlabs-apt.git] / spec / spec_helper_acceptance.rb
index fe3e4bf0c991ccced1f180cf1dfd3fd9b4df2a82..fd1f2c56b9c0167498523d675a46a1ec433dcdd4 100644 (file)
@@ -2,13 +2,14 @@ require 'beaker-rspec'
 
 # Install Puppet
 unless ENV['RS_PROVISION'] == 'no'
+  # This will install the latest available package on el and deb based
+  # systems fail on windows and osx, and install via gem on other *nixes
+  foss_opts = { :default_action => 'gem_install' }
+
+  if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end
+
   hosts.each do |host|
-    if host.is_pe?
-      install_pe
-    else
-      install_puppet
-      on host, "mkdir -p #{host['distmoduledir']}"
-    end
+    on host, "mkdir -p #{host['distmoduledir']}"
   end
 end