Sha256: 12c71c512b3a0e43007ddac4251c97c6fd139714dc686df45b48d8bf6d85afe9
Contents?: true
Size: 932 Bytes
Versions: 2
Compression:
Stored size: 932 Bytes
Contents
require "spec_helper" describe Fume::SmartLogger do before(:each) do @logger = Logger.new(STDOUT) end it "should be create STDOUT logger" do Logger.should_receive(:new).with(STDOUT).and_return(@logger) SmartLogger.create("STDOUT").should be_eql @logger end it "should be create log file logger" do Logger.should_receive(:new).with(Rails.root.join("log", "file.log")).and_return(@logger) SmartLogger.create("file").should be_eql @logger end it "should be create log file logger with ext" do Logger.should_receive(:new).with(Rails.root.join("log", "file.log")).and_return(@logger) SmartLogger.create("file.log").should be_eql @logger end it "should be create log file by Rails env" do Logger.should_receive(:new).with(Rails.root.join("log", "development.log")).and_return(@logger) Rails.env = "development" SmartLogger.create(nil).should be_eql @logger end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fume-0.3.4 | spec/fume/smart_logger_spec.rb |
fume-0.3.3 | spec/fume/smart_logger_spec.rb |