diff options
author | Luke Kanies <luke@madstop.com> | 2008-05-19 22:10:51 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-05-19 22:10:51 -0500 |
commit | b8ce6a1a8c5dc370cae86cc3a40450d472e6843c (patch) | |
tree | ca02c3f276124ce6e158103ce7e84ee6841bd67e | |
parent | 3b6a614b02676b8201262605ff982aa9de96a65c (diff) | |
download | puppet-b8ce6a1a8c5dc370cae86cc3a40450d472e6843c.tar.gz puppet-b8ce6a1a8c5dc370cae86cc3a40450d472e6843c.tar.xz puppet-b8ce6a1a8c5dc370cae86cc3a40450d472e6843c.zip |
Mocking Facter in an integration test, so it works with no networking
-rwxr-xr-x | spec/integration/node/catalog.rb | 6 |
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 |