Sha256: c836c39be29e3095c669fb478b65244c58b0fbc0afb6941704ce597e42ce8369
Contents?: true
Size: 748 Bytes
Versions: 4
Compression:
Stored size: 748 Bytes
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' describe TTY::Logger, '#new' do let(:object) { described_class } let(:output) { StringIO.new } subject { object.new options } context 'when default' do let(:options) { {:namespace => ''} } its(:level) { should eql object::ALL } its(:output) { should eql $stderr } its(:timestamp_format) { should eql '%Y-%m-%d %T' } end context 'when custom' do let(:options) { { :namespace => 'tty::color', :level => 2, :output => output, :timestamp_format => "%dd" } } its(:namespace) { should eql 'tty::color' } its(:level) { should eql 2 } its(:output) { should eql output } its(:timestamp_format) { should eql '%dd' } end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
tty-0.0.11 | spec/tty/logger/new_spec.rb |
tty-0.0.10 | spec/tty/logger/new_spec.rb |
tty-0.0.9 | spec/tty/logger/new_spec.rb |
tty-0.0.8 | spec/tty/logger/new_spec.rb |