From: Andrew Parker Date: Wed, 18 Dec 2013 22:46:54 +0000 (-0800) Subject: (Maint) Update stubbing to work with facter 1.7.4 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=799e968f5c8ba901a8b395cff6f8848caf8b00e9;p=puppet-stdlib.git (Maint) Update stubbing to work with facter 1.7.4 Facter 1.7.4 changed how it decides on what directory to look in for facts.d based on the user it is running as. This stubs out that bit of code to make it think it is running as root. --- diff --git a/spec/unit/facter/pe_required_facts_spec.rb b/spec/unit/facter/pe_required_facts_spec.rb index f219b37..85ff6ab 100644 --- a/spec/unit/facter/pe_required_facts_spec.rb +++ b/spec/unit/facter/pe_required_facts_spec.rb @@ -9,6 +9,7 @@ describe "External facts in /etc/puppetlabs/facter/facts.d/puppet_enterprise_ins context "With Facter 1.6.17 which does not have external facts support" do before :each do Facter.stubs(:version).returns("1.6.17") + Facter::Util::Root.stubs(:root?).returns(true) # Stub out the filesystem for stdlib Dir.stubs(:entries).with("/etc/puppetlabs/facter/facts.d"). returns(['puppet_enterprise_installer.txt'])