summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-05-16 15:42:20 -0500
committerLuke Kanies <luke@madstop.com>2008-05-16 15:42:20 -0500
commit8008bbc447764e0ca28169284f4d6df3a86dcdd6 (patch)
treef4f8a09b0b4ffcfac8f9196c9977fbcb21b6cece /spec
parenta02c6bbe7ccac05593c9e07e9f0215ab6ceda8ad (diff)
Modified the 'factpath' setting to automatically configure
Facter to load facts there if a new enough version of Facter is used.
Diffstat (limited to 'spec')
-rwxr-xr-xspec/integration/defaults.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/integration/defaults.rb b/spec/integration/defaults.rb
new file mode 100755
index 000000000..b14a141fb
--- /dev/null
+++ b/spec/integration/defaults.rb
@@ -0,0 +1,17 @@
+#!/usr/bin/env ruby
+
+require File.dirname(__FILE__) + '/../spec_helper'
+
+require 'puppet/defaults'
+
+describe "Puppet defaults" do
+ describe "when setting the :factpath" do
+ after { Puppet.settings.clear }
+
+ it "should add the :factpath to Facter's search paths" do
+ Facter.expects(:search).with("/my/fact/path")
+
+ Puppet.settings[:factpath] = "/my/fact/path"
+ end
+ end
+end