diff options
| author | Paul Berry <paul@puppetlabs.com> | 2010-11-18 13:21:35 -0800 |
|---|---|---|
| committer | Paul Berry <paul@puppetlabs.com> | 2010-11-18 14:55:05 -0800 |
| commit | cf18353472ce9c4e51157d21882a7f129853fd10 (patch) | |
| tree | c31ee9be07ffa97c1ec1ada8d4a090afc51506cd /spec/unit | |
| parent | ee56cfd01fce154da38d5f251f66c495b2013b5d (diff) | |
Maint: Switched spec tests to use a class rather than Array as the log destination.
Using an Array as a log destination is unreliable because Puppet's log
mechanism stores log destinations in a hash whose key is the
destination itself. Since arrays can change their hash when they are
modified, this was causing the log destination hash to become
corrupted, producing sporadic spec test failures.
Diffstat (limited to 'spec/unit')
| -rwxr-xr-x | spec/unit/util/log_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/unit/util/log_spec.rb b/spec/unit/util/log_spec.rb index 4cec7105d..ea5d59859 100755 --- a/spec/unit/util/log_spec.rb +++ b/spec/unit/util/log_spec.rb @@ -7,7 +7,7 @@ require 'puppet/util/log' describe Puppet::Util::Log do it "should write a given message to the specified destination" do arraydest = [] - Puppet::Util::Log.newdestination(arraydest) + Puppet::Util::Log.newdestination(Puppet::Test::LogCollector.new(arraydest)) Puppet::Util::Log.new(:level => :notice, :message => "foo") message = arraydest.last.message message.should == "foo" |
