[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.7-1-98-gf19c0e5

Luke Kanies luke at madstop.com
Wed Apr 8 21:48:11 UTC 2009


The following commit has been merged in the master branch:
commit 7cf085c9ebdb1d1c92e317a406844bfc0eceafe6
Author: Luke Kanies <luke at madstop.com>
Date:   Thu Feb 12 22:48:34 2009 -0600

    Adding tests for Puppet::Indirector::Facts::Facter.loadfacts
    
    I just copied the tests from the master branch, changed as
    necessary.
    
    Signed-off-by: Luke Kanies <luke at madstop.com>

diff --git a/spec/unit/indirector/facts/facter.rb b/spec/unit/indirector/facts/facter.rb
index 225eb15..5dcc444 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

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list