From 5f0cf4ef50a3676229a1c824b9a730b6951e1c7a Mon Sep 17 00:00:00 2001 From: Jesse Wolfe Date: Mon, 1 Nov 2010 11:40:48 -0700 Subject: Maint: Don't use a stub for a Facts object in the compiler specs The catalog compiler spec was overstubbing the Node::Facts object, making it hard to test the interaction between those two systems. --- spec/unit/indirector/catalog/compiler_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/unit/indirector/catalog/compiler_spec.rb b/spec/unit/indirector/catalog/compiler_spec.rb index 5cbb62985..a9c2e3e28 100755 --- a/spec/unit/indirector/catalog/compiler_spec.rb +++ b/spec/unit/indirector/catalog/compiler_spec.rb @@ -156,7 +156,8 @@ describe Puppet::Resource::Catalog::Compiler do @compiler = Puppet::Resource::Catalog::Compiler.new @request = stub 'request', :options => {} - @facts = stub 'facts', :save => nil + @facts = Puppet::Node::Facts.new('hostname', "fact" => "value", "architecture" => "i386") + @facts.stubs(:save).returns(nil) end it "should do nothing if no facts are provided" do -- cgit