summaryrefslogtreecommitdiff
path: root/spec/unit/monologger_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/monologger_spec.rb')
-rw-r--r--spec/unit/monologger_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/monologger_spec.rb b/spec/unit/monologger_spec.rb
index 38b23f22c6..3babc29218 100644
--- a/spec/unit/monologger_spec.rb
+++ b/spec/unit/monologger_spec.rb
@@ -20,6 +20,12 @@ require 'tempfile'
require 'spec_helper'
describe MonoLogger do
+ it "should disable buffering when passed an IO stream" do
+ STDOUT.sync = false
+ MonoLogger.new(STDOUT)
+ STDOUT.sync.should == true
+ end
+
describe "when given an object that responds to write and close e.g. IO" do
it "should use the object directly" do
stream = StringIO.new