Sha256: ba1700e09794cb3b200a5c03b80bab5b7f4029b9426a4b7d8c81208767a1f3e0
Contents?: true
Size: 592 Bytes
Versions: 11
Compression:
Stored size: 592 Bytes
Contents
# -*- coding: utf-8 -*- require 'spec_helper' require 'stringio' describe Tengine::Core::IoToLogger do context "redirect from io to logger" do before do @io = StringIO.new @logger = Logger.new(@io) @logger.level = Logger::INFO end subject{ Tengine::Core::IoToLogger.new(@logger) } it "should provide puts method" do subject.puts("foo") @io.rewind @io.readlines.should == ["foo\n"] end it "should provide write method" do subject.write("foo") @io.rewind @io.readlines.should == ["foo\n"] end end end
Version data entries
11 entries across 11 versions & 1 rubygems