From b8ce6a1a8c5dc370cae86cc3a40450d472e6843c Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Mon, 19 May 2008 22:10:51 -0500 Subject: Mocking Facter in an integration test, so it works with no networking --- spec/integration/node/catalog.rb | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit