mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
sometimes puma does not log in test mode
This commit is contained in:
parent
da77d8f31e
commit
5a8080a077
2 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue