Sha256: 0b0b6ea587c766098ec439d05ddae1dd6b741af20687bf61fd9c6c835046b797
Contents?: true
Size: 758 Bytes
Versions: 13
Compression:
Stored size: 758 Bytes
Contents
# -*- rspec -*- BEGIN { require 'pathname' basedir = Pathname( __FILE__ ).dirname.parent.parent.parent $LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s ) } require 'tempfile' require 'rspec' require 'spec/lib/helpers' require 'loggability/logger' require 'loggability/formatter' require 'loggability/formatter/color' describe Loggability::Formatter::Color do before( :all ) do @original_term = ENV['TERM'] ENV['TERM'] = 'xterm-color' end after( :all ) do ENV['TERM'] = @original_term end before( :each ) do @formatter = described_class.new end it "formats messages with ANSI color" do @formatter.call( 'INFO', Time.at(1336286481), nil, "Foom." ). should include( "-- \e[37mFoom.\e[0m\n" ) end end
Version data entries
13 entries across 13 versions & 1 rubygems