From 57275061ab63f26c0fc08361cb0d838708b1003c Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 11 Aug 2015 19:52:43 -0700 Subject: Add puppet_version back to spec_helper --- spec/spec_helper_acceptance.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spec') 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' -- cgit v1.2.3