From e596bc5267bdbbe2e4ea0e7722047d1354f10826 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Mon, 5 May 2008 21:01:33 -0500 Subject: Fixing some tests that were insufficiently mocking their configurations. These were still writing to ~. --- spec/unit/node/catalog.rb | 1 + spec/unit/rails.rb | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/spec/unit/node/catalog.rb b/spec/unit/node/catalog.rb index 8d7692442..f397b8706 100755 --- a/spec/unit/node/catalog.rb +++ b/spec/unit/node/catalog.rb @@ -578,6 +578,7 @@ describe Puppet::Node::Catalog do # super() doesn't work in the setup method for some reason before do @catalog.host_config = true + Puppet::Util::Storage.stubs(:store) end it "should send a report if reporting is enabled" do diff --git a/spec/unit/rails.rb b/spec/unit/rails.rb index ad32cac86..ae7ea9f95 100755 --- a/spec/unit/rails.rb +++ b/spec/unit/rails.rb @@ -6,6 +6,13 @@ require 'puppet/rails' describe Puppet::Rails, "when initializing any connection" do confine Puppet.features.rails? => "Cannot test without ActiveRecord" + before do + @logger = stub 'logger', :level= => nil + @logger.stub_everything + + Logger.stubs(:new).returns @logger + end + it "should use settings" do Puppet.settings.expects(:use).with(:main, :rails, :puppetmasterd) -- cgit