diff options
| -rwxr-xr-x | spec/unit/indirector/facts/facter.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/unit/indirector/facts/facter.rb b/spec/unit/indirector/facts/facter.rb index 225eb153b..5dcc4442b 100755 --- a/spec/unit/indirector/facts/facter.rb +++ b/spec/unit/indirector/facts/facter.rb @@ -70,7 +70,14 @@ describe Puppet::Node::Facts::Facter do end end - describe Puppet::Node::Facts::Facter, " when loading facts from the factpath" do - it "should load every fact in each factpath directory" + describe Puppet::Node::Facts::Facter, "when loading facts from the factpath" do + it "should load each directory in the Fact path when loading fact" do + Puppet.settings.expects(:value).with(:factpath).returns("one%stwo" % File::PATH_SEPARATOR) + + Puppet::Node::Facts::Facter.expects(:loaddir).with("one", "fact") + Puppet::Node::Facts::Facter.expects(:loaddir).with("two", "fact") + + Puppet::Node::Facts::Facter.loadfacts + end end end |
