(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.
This commit is contained in:
Andrew Parker 2013-12-18 14:46:54 -08:00
parent 1cf4b04b33
commit 799e968f5c

View file

@ -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'])