diff options
| author | Luke Kanies <luke@madstop.com> | 2008-05-05 21:01:33 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-05-05 21:01:33 -0500 |
| commit | e596bc5267bdbbe2e4ea0e7722047d1354f10826 (patch) | |
| tree | 05b099636251e8cfd6d4eb9c89baa6cf071d58e1 /spec/unit | |
| parent | 160f9d99e33b051d40f00971683cf54a0ff00c32 (diff) | |
| download | puppet-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-x | spec/unit/node/catalog.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/rails.rb | 7 |
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) |
