Sha256: 1a2a3d6d78184f9e8427c03464a58ce8498c1a501522b9b5eaf9476e5c6066a8
Contents?: true
Size: 898 Bytes
Versions: 24
Compression:
Stored size: 898 Bytes
Contents
require 'spec_helper' require 'sneakers' require 'logger' class Foobar include Sneakers::Concerns::Logging end describe Sneakers::Concerns::Logging do describe ".configure" do before do Foobar.logger = nil end it "should configure a default logger when included" do Foobar.logger.must_be_nil Foobar.configure_logger Foobar.logger.wont_be_nil Foobar.logger.formatter.must_equal Sneakers::Support::ProductionFormatter end it "should supply accessible instance logger" do Foobar.logger.must_be_nil Foobar.configure_logger f = Foobar.new f.logger.must_equal Foobar.logger f.logger.wont_be_nil end it "should configure a given logger when specified" do Foobar.logger.must_be_nil log = Logger.new(STDOUT) Foobar.configure_logger(log) Foobar.logger.must_equal log end end end
Version data entries
24 entries across 24 versions & 2 rubygems