Skip to content

Commit

Permalink
fix(test): alias Rack/Rackup WEBrick handler in x509 test for backwar…
Browse files Browse the repository at this point in the history
…ds compat
  • Loading branch information
YOU54F committed Jun 25, 2024
1 parent faba92f commit cc77498
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/support/ssl_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ def webrick_opts port
require "rack"
begin
require "rackup/handler/webrick" # rack 3
PactWEBrick = Rackup::Handler::WEBrick
rescue LoadError
require "rack/handler/webrick" # rack 2
PactWEBrick = Rack::Handler::WEBrick
end

opts = webrick_opts(4444)

Rack::Handler::WEBrick.run(app, **opts) do |server|
PactWEBrick.run(app, **opts) do |server|
@server = server
end
end

0 comments on commit cc77498

Please sign in to comment.