summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rwxr-xr-xspec/spec_helper_acceptance.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb
index 67a6e33..f784112 100755
--- a/spec/spec_helper_acceptance.rb
+++ b/spec/spec_helper_acceptance.rb
@@ -35,13 +35,14 @@ end
RSpec.shared_context "with faked facts" do
let(:facts_d) do
+ puppet_version = (on default, puppet('--version')).output.chomp
if fact('osfamily') =~ /windows/i
if fact('kernelmajversion').to_f < 6.0
'C:/Documents and Settings/All Users/Application Data/PuppetLabs/facter/facts.d'
else
'C:/ProgramData/PuppetLabs/facter/facts.d'
end
- elsif fact('is_pe', '--puppet') == "true"
+ elsif Puppet::Util::Package.versioncmp(puppet_version, '4.0.0') < 0 and fact('is_pe', '--puppet') == "true"
'/etc/puppetlabs/facter/facts.d'
else
'/etc/facter/facts.d'