Updates
SVG-Edit -> 2.5final Vendored Rack -> 1.2.1
This commit is contained in:
parent
6338a3bcb2
commit
0d8f680d4f
82 changed files with 138 additions and 70 deletions
20
vendor/plugins/rack/test/spec_logger.rb
vendored
Normal file
20
vendor/plugins/rack/test/spec_logger.rb
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
require 'stringio'
|
||||
require 'rack/logger'
|
||||
|
||||
describe Rack::Logger do
|
||||
should "log to rack.errors" do
|
||||
app = lambda { |env|
|
||||
log = env['rack.logger']
|
||||
log.debug("Created logger")
|
||||
log.info("Program started")
|
||||
log.warn("Nothing to do!")
|
||||
|
||||
[200, {'Content-Type' => 'text/plain'}, ["Hello, World!"]]
|
||||
}
|
||||
|
||||
errors = StringIO.new
|
||||
Rack::Logger.new(app).call('rack.errors' => errors)
|
||||
errors.string.should.match(/INFO -- : Program started/)
|
||||
errors.string.should.match(/WARN -- : Nothing to do/)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue