Sha256: 0be7e88afb459ed15339d11aa7c1d6de33eb7c0ce1d0acdccd8b0e5a8b116a33
Contents?: true
Size: 774 Bytes
Versions: 7
Compression:
Stored size: 774 Bytes
Contents
require 'spec_helper' describe Sdbport do it "should create a new logger object from the hash passed as :logger" do logger_mock = mock 'logger' logger_mock.should_receive(:info).with 'a message' logger = Sdbport::SdbportLogger.new :logger => logger_mock logger.info 'a message' end it "should create a new logger object when one is not passed" do logger_mock = mock 'logger' Logger.should_receive(:new).with(STDOUT).and_return logger_mock logger_mock.should_receive(:info).with 'a message' logger_mock.should_receive(:datetime_format=).with '%Y-%m-%dT%H:%M:%S%z' logger_mock.should_receive(:formatter=) logger_mock.should_receive(:level=).with 1 logger = Sdbport::SdbportLogger.new logger.info 'a message' end end
Version data entries
7 entries across 7 versions & 1 rubygems