From 4bb40e117ff65badcb585ee05325a25b16ec2563 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Fri, 21 Sep 2018 16:37:27 -0500 Subject: [PATCH] windows add two tests - test\test_rack_handler.rb --- test/test_rack_handler.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test_rack_handler.rb b/test/test_rack_handler.rb index e44517ee..5007e20e 100644 --- a/test/test_rack_handler.rb +++ b/test/test_rack_handler.rb @@ -2,7 +2,7 @@ require_relative "helper" require "rack/handler/puma" -class TestPumaUnixSocket < Minitest::Test +class TestHandlerGetStrSym < Minitest::Test def test_handler handler = Rack::Handler.get(:puma) assert_equal Rack::Handler::Puma, handler @@ -46,11 +46,11 @@ class TestPathHandler < Minitest::Test thread.join if thread end - def test_handler_boots - skip_on :windows - in_handler(app) do |launcher| - hit(["http://0.0.0.0:#{ launcher.connected_port }/test"]) + host = windows? ? "127.0.1.1" : "0.0.0.0" + opts = { Host: host } + in_handler(app, opts) do |launcher| + hit(["http://#{host}:#{ launcher.connected_port }/test"]) assert_equal("/test", @input["PATH_INFO"]) end end