sometimes puma does not log in test mode

This commit is contained in:
Konstantin Haase 2012-04-26 01:42:53 -05:00
parent da77d8f31e
commit 5a8080a077
2 changed files with 5 additions and 0 deletions

View File

@ -126,6 +126,10 @@ module IntegrationHelper
name.to_s == "thin"
end
def puma?
name.to_s == "puma"
end
def warnings
log.scan(%r[(?:\(eval|lib/sinatra).*warning:.*$])
end

View File

@ -13,6 +13,7 @@ class IntegrationTest < Test::Unit::TestCase
it('only extends main') { assert_equal "true", server.get("/mainonly") }
it 'logs once in development mode' do
next if server.puma?
random = "%064x" % Kernel.rand(2**256-1)
server.get "/ping?x=#{random}"
count = server.log.scan("GET /ping?x=#{random}").count