spec_nulllogger.rb 320 B

123456789101112
  1. require 'rack/nulllogger'
  2. describe Rack::NullLogger do
  3. should "act as a noop logger" do
  4. app = lambda { |env|
  5. env['rack.logger'].warn "b00m"
  6. [200, {'Content-Type' => 'text/plain'}, ["Hello, World!"]]
  7. }
  8. logger = Rack::NullLogger.new(app)
  9. lambda{ logger.call({}) }.should.not.raise
  10. end
  11. end