summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-05-05 21:01:33 -0500
committerLuke Kanies <luke@madstop.com>2008-05-05 21:01:33 -0500
commite596bc5267bdbbe2e4ea0e7722047d1354f10826 (patch)
tree05b099636251e8cfd6d4eb9c89baa6cf071d58e1 /spec/unit
parent160f9d99e33b051d40f00971683cf54a0ff00c32 (diff)
downloadpuppet-e596bc5267bdbbe2e4ea0e7722047d1354f10826.tar.gz
puppet-e596bc5267bdbbe2e4ea0e7722047d1354f10826.tar.xz
puppet-e596bc5267bdbbe2e4ea0e7722047d1354f10826.zip
Fixing some tests that were insufficiently mocking their configurations.
These were still writing to ~.
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/node/catalog.rb1
-rwxr-xr-xspec/unit/rails.rb7
2 files changed, 8 insertions, 0 deletions
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)