summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-05-19 22:10:51 -0500
committerLuke Kanies <luke@madstop.com>2008-05-19 22:10:51 -0500
commitb8ce6a1a8c5dc370cae86cc3a40450d472e6843c (patch)
treeca02c3f276124ce6e158103ce7e84ee6841bd67e
parent3b6a614b02676b8201262605ff982aa9de96a65c (diff)
downloadpuppet-b8ce6a1a8c5dc370cae86cc3a40450d472e6843c.tar.gz
puppet-b8ce6a1a8c5dc370cae86cc3a40450d472e6843c.tar.xz
puppet-b8ce6a1a8c5dc370cae86cc3a40450d472e6843c.zip
Mocking Facter in an integration test, so it works with no networking
-rwxr-xr-xspec/integration/node/catalog.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/integration/node/catalog.rb b/spec/integration/node/catalog.rb
index ca14c2ea8..941d2cc6c 100755
--- a/spec/integration/node/catalog.rb
+++ b/spec/integration/node/catalog.rb
@@ -7,6 +7,12 @@ require File.dirname(__FILE__) + '/../../spec_helper'
describe Puppet::Node::Catalog do
describe "when using the indirector" do
+ before do
+ # This is so the tests work w/out networking.
+ Facter.stubs(:to_hash).returns({"hostname" => "foo.domain.com"})
+ Facter.stubs(:value).returns("eh")
+ end
+
after { Puppet::Node::Catalog.indirection.clear_cache }
it "should be able to delegate to the :yaml terminus" do