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