diff options
author | Christopher Brown <cb@opscode.com> | 2009-04-21 09:03:24 -0700 |
---|---|---|
committer | Christopher Brown <cb@opscode.com> | 2009-04-21 09:03:24 -0700 |
commit | 8026e5758f51e8383d7c9a0cab02ac060af80e53 (patch) | |
tree | 1debc42636cf9d32e073b436d6342da8d792e15a | |
parent | 28cdf6ff564d67d412b5da993f07e15fe353d299 (diff) | |
download | mixlib-log-PL-161.tar.gz |
Updated test to clear class instance variable between tests, after altering internal logger behaviourPL-161
-rw-r--r-- | spec/mixlib/log_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/mixlib/log_spec.rb b/spec/mixlib/log_spec.rb index 4621969..259ae36 100644 --- a/spec/mixlib/log_spec.rb +++ b/spec/mixlib/log_spec.rb @@ -20,6 +20,12 @@ require 'tempfile' require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper")) describe Mixlib::Log do + + # Since we are testing class behaviour for an instance variable + # that gets set once, we need to reset it prior to each example [cb] + before(:each) do + Logit.instance_variable_set("@logger",nil) + end it "should accept regular options to Logger.new via init" do tf = Tempfile.new("chef-test-log") @@ -59,4 +65,4 @@ describe Mixlib::Log do Logit.init end -end
\ No newline at end of file +end |