]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
(Maint) Update stubbing to work with facter 1.7.4
authorAndrew Parker <andy@puppetlabs.com>
Wed, 18 Dec 2013 22:46:54 +0000 (14:46 -0800)
committerAndrew Parker <andy@puppetlabs.com>
Wed, 18 Dec 2013 22:46:54 +0000 (14:46 -0800)
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.

spec/unit/facter/pe_required_facts_spec.rb

index f219b371f8a50585ccff22bd36982a8b7a1d822d..85ff6ab9361880ea29d0593571283c48716c6a6e 100644 (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'])