Skip to content

Commit

Permalink
windows add two tests - test\test_rack_handler.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
MSP-Greg committed Sep 21, 2018
1 parent 72882f2 commit 4bb40e1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test_rack_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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
Expand Down Expand Up @@ -46,11 +46,11 @@ def in_handler(app, options = {})
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
Expand Down

0 comments on commit 4bb40e1

Please sign in to comment.