summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHunter Haugen <hunter@puppetlabs.com>2015-08-11 19:52:43 -0700
committerHunter Haugen <hunter@puppetlabs.com>2015-08-11 19:52:43 -0700
commit57275061ab63f26c0fc08361cb0d838708b1003c (patch)
treed11b71b8055092abaa1b71bc9b6c2013b3f1282f /spec
parenta72918f6759d99db774e1cfc036cc01a440fa9de (diff)
Add puppet_version back to spec_helper
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'