Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 0fab4073b8
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (26 sloc) 0.949 kb
# encoding: utf-8
require File.expand_path('../spec_helper', __FILE__)
require 'timecop'
describe HireFire::Logger do
before do
Timecop.freeze( Time.now )
end
context 'when logging regular messages' do
it do
HireFire::Logger.expects(:puts).with("[#{ Time.now.strftime("%Y-%m-%d %H:%M:%S") }][\e[32mHireFire\e[0m] This has been logged.")
HireFire::Logger.message "This has been logged."
end
end
context 'when logging error messages' do
it do
HireFire::Logger.expects(:puts).with("[#{ Time.now.strftime("%Y-%m-%d %H:%M:%S") }][\e[31mHireFire\e[0m] This has been logged.")
HireFire::Logger.error "This has been logged."
end
end
context 'when logging warn messages' do
it do
HireFire::Logger.expects(:puts).with("[#{ Time.now.strftime("%Y-%m-%d %H:%M:%S") }][\e[33mHireFire\e[0m] This has been logged.")
HireFire::Logger.warn "This has been logged."
end
end
end
Jump to Line
Something went wrong with that request. Please try again.