From 3528a7b98c300f3ffa363d232b5f577f298390eb Mon Sep 17 00:00:00 2001 From: Jesse Wolfe Date: Mon, 14 Dec 2009 23:47:48 -0800 Subject: 2850 spec/unit/application/puppetd.rb generates warnings if run with certain other tests Puppet[:libdir] is nil due to stubbing, causing an exception in autoload. Depending on the order of loaded libs, sometimes this exception is logged using Kernel#warn, but sometimes it's logged using Puppet.err Only Kernel#warn writes to the terminal during unit testing! --- spec/unit/application/puppetd.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/unit/application/puppetd.rb b/spec/unit/application/puppetd.rb index e5a51675d..ec2fd546d 100755 --- a/spec/unit/application/puppetd.rb +++ b/spec/unit/application/puppetd.rb @@ -173,6 +173,7 @@ describe "puppetd" do Puppet.stubs(:info) FileTest.stubs(:exists?).returns(true) Puppet.stubs(:[]) + Puppet.stubs(:[]).with(:libdir).returns("/dev/null/lib") Puppet.settings.stubs(:print_config?) Puppet.settings.stubs(:print_config) Puppet::SSL::Host.stubs(:ca_location=) -- cgit