Browse files

sometimes puma does not log in test mode

  • Loading branch information...
1 parent da77d8f commit 5a8080a077c298efc9917f7126503e99b9adb60b @rkh rkh committed Apr 26, 2012
Showing with 5 additions and 0 deletions.
  1. +4 −0 test/integration_helper.rb
  2. +1 −0 test/integration_test.rb
View
4 test/integration_helper.rb
@@ -126,6 +126,10 @@ def thin?
name.to_s == "thin"
end
+ def puma?
+ name.to_s == "puma"
+ end
+
def warnings
log.scan(%r[(?:\(eval|lib/sinatra).*warning:.*$])
end
View
1 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

0 comments on commit 5a8080a

Please sign in to comment.