Sha256: 9a1d7a3c6cfa122044e0fe138819cfc70b8fd715afbc33064e495940d4ff9d6e
Contents?: true
Size: 672 Bytes
Versions: 2
Compression:
Stored size: 672 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper' require 'logger' describe Low::Middleware::RequestLogger do def test_app lambda do |env| [200, {'Content-Type' => 'text/plain'}, env['rack.logger']] end end it 'should set rack.logger to an instance of `Low::ScopedLogger` with scope set to \'request_id\' and level set to \'low.log_level\'' do rack = Low::Middleware::RequestLogger.new test_app response = rack.call({'request_id' => 'abc123', 'low.log_level' => Logger::FATAL}) logger = response[2] logger.should be_a(Low::ScopedLogger) logger.scope.should == 'abc123' logger.level.should == Logger::FATAL end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
low-0.0.12 | spec/low/middleware/request_logger_spec.rb |
low-0.0.11 | spec/low/middleware/request_logger_spec.rb |