summaryrefslogtreecommitdiff
path: root/spec/spec_helper_acceptance.rb
diff options
context:
space:
mode:
authorDavid Schmitt <david.schmitt@puppetlabs.com>2015-07-30 10:46:38 +0100
committerDavid Schmitt <david.schmitt@puppetlabs.com>2015-07-30 10:46:38 +0100
commit44c4bad392e627ed6394a4a5e93ae85cd4c4ca50 (patch)
treeca6a7bb3e7f4d6fd87de0f18ba07163403d0cc6f /spec/spec_helper_acceptance.rb
parentac0b096d49b7c00b43b98c75ed5c1c2b6af60169 (diff)
(maint) use puppet's utility function instead of API that's not available on all rubies
Diffstat (limited to 'spec/spec_helper_acceptance.rb')
-rwxr-xr-xspec/spec_helper_acceptance.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb
index 6f7f8e1..03ff993 100755
--- a/spec/spec_helper_acceptance.rb
+++ b/spec/spec_helper_acceptance.rb
@@ -1,7 +1,6 @@
#! /usr/bin/env ruby -S rspec
require 'beaker-rspec'
require 'beaker/puppet_install_helper'
-require 'rubygems'
UNSUPPORTED_PLATFORMS = []
@@ -37,7 +36,7 @@ end
RSpec.shared_context "with faked facts" do
let(:facts_d) do
puppet_version = (on default, puppet('--version')).output.chomp
- if Gem::Version(puppet_version) < Gem::Version('4.0.0') && fact('is_pe', '--puppet') == "true"
+ if Puppet::Util::Package.versioncmp(puppet_version, '4.0.0') < 0 && fact('is_pe', '--puppet') == "true"
if fact('osfamily') =~ /windows/i
if fact('kernelmajversion').to_f < 6.0
'C:/Documents and Settings/All Users/Application Data/PuppetLabs/facter/facts.d'