Sha256: fb2d2620e0637dad24ffb78cc7bd8795cb48670641b4b050da5669103511a38b
Contents?: true
Size: 802 Bytes
Versions: 5
Compression:
Stored size: 802 Bytes
Contents
require 'spec_helper' describe Heirloom do it "should create a new logger object from the hash passed as :logger" do logger_double = double 'logger' logger_double.should_receive(:info).with 'a message' logger = Heirloom::HeirloomLogger.new :logger => logger_double logger.info 'a message' end it "should create a new logger object when one is not passed" do logger_double = double 'logger' Logger.should_receive(:new).with($stdout).and_return logger_double logger_double.should_receive(:info).with 'a message' logger_double.should_receive(:datetime_format=).with '%Y-%m-%dT%H:%M:%S%z' logger_double.should_receive(:formatter=) logger_double.should_receive(:level=).with 1 logger = Heirloom::HeirloomLogger.new logger.info 'a message' end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
heirloom-0.12.7 | spec/logger_spec.rb |
heirloom-0.12.5 | spec/logger_spec.rb |
heirloom-0.12.4 | spec/logger_spec.rb |
heirloom-0.12.3 | spec/logger_spec.rb |
heirloom-0.12.2 | spec/logger_spec.rb |