Skip to content

Commit

Permalink
Merge pull request #1653 from MSP-Greg/test_rack_handler
Browse files Browse the repository at this point in the history
windows add two tests - test\test_rack_handler.rb
  • Loading branch information
evanphx committed Oct 5, 2018
2 parents 72882f2 + 4bb40e1 commit 9de253d
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 9de253d

Please sign in to comment.