kemal/spec/logger_spec.cr

17 lines
370 B
Crystal
Raw Normal View History

2015-10-27 19:01:36 +00:00
require "./spec_helper"
describe "Logger" do
2015-11-18 20:45:49 +00:00
it "creates a STDOUT handler by default" do
config = Kemal.config
logger = Kemal::Logger.new
logger.handler.should be_a IO
end
it "creates a file handler in production" do
config = Kemal.config
config.env = "production"
logger = Kemal::Logger.new
logger.handler.should be_a File
2015-10-27 19:01:36 +00:00
end
end