1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

warn when bundler fails and avoid having to use -I to run tests (#1270)

This commit is contained in:
Michael Grosser 2017-04-11 14:48:11 -07:00 committed by Nate Berkopec
parent 61de1a8891
commit d25ef26465
23 changed files with 36 additions and 39 deletions

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/app/status"
require "rack"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/binder"
require "puma/events"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/cli"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/configuration"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/events"

View file

@ -4,37 +4,34 @@
begin
require "bundler/setup"
rescue LoadError
warn "Failed to load bundler ... this should only happen during package building"
end
require "net/http"
require "timeout"
require "minitest/autorun"
require "minitest/pride"
require "puma"
require "puma/detect"
$LOAD_PATH << File.expand_path("../../lib", __FILE__)
require "puma"
require "puma/detect"
# Either takes a string to do a get request against, or a tuple of [URI, HTTP] where
# HTTP is some kind of Net::HTTP request object (POST, HEAD, etc.)
def hit(uris)
results = []
uris.map do |u|
response =
if u.kind_of? String
Net::HTTP.get(URI.parse(u))
else
url = URI.parse(u[0])
Net::HTTP.new(url.host, url.port).start {|h| h.request(u[1]) }
end
uris.each do |u|
res = nil
if u.kind_of? String
res = Net::HTTP.get(URI.parse(u))
else
url = URI.parse(u[0])
res = Net::HTTP.new(url.host, url.port).start {|h| h.request(u[1]) }
end
assert res != nil, "Didn't get a response: #{u}"
results << res
assert response, "Didn't get a response: #{u}"
response
end
return results
end
module TimeoutEveryTestCase

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/puma_http11"

View file

@ -1,7 +1,7 @@
# Copyright (c) 2011 Evan Phoenix
# Copyright (c) 2005 Zed A. Shaw
require "test_helper"
require_relative "test_helper"
require "puma/puma_http11"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/cli"
require "puma/control_cli"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/io_buffer"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/minissl"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/null_io"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
class TestPersistent < Minitest::Test
def setup

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
class TestPumaServer < Minitest::Test

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/events"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require 'puma/control_cli'

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "rack/handler/puma"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "rack"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/events"
require "puma/tcp_logger"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/events"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
require "puma/thread_pool"

View file

@ -1,4 +1,4 @@
require "test_helper"
require_relative "test_helper"
# UNIX sockets are not recommended on JRuby
# (or Windows)

View file

@ -1,7 +1,7 @@
# Copyright (c) 2011 Evan Phoenix
# Copyright (c) 2005 Zed A. Shaw
require "test_helper"
require_relative "test_helper"
require "puma/server"