From 5a8080a077c298efc9917f7126503e99b9adb60b Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Thu, 26 Apr 2012 01:42:53 -0500 Subject: [PATCH] sometimes puma does not log in test mode --- test/integration_helper.rb | 4 ++++ test/integration_test.rb | 1 + 2 files changed, 5 insertions(+) diff --git a/test/integration_helper.rb b/test/integration_helper.rb index f36082bd..d9548e3f 100644 --- a/test/integration_helper.rb +++ b/test/integration_helper.rb @@ -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 diff --git a/test/integration_test.rb b/test/integration_test.rb index 49fe8ac2..51f0da2a 100644 --- a/test/integration_test.rb +++ b/test/integration_test.rb @@ -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