diff --git a/spec/datadog/tracing/contrib/suite/integration_spec.rb b/spec/datadog/tracing/contrib/suite/integration_spec.rb index eaf37eb1f8a..622a67088b0 100644 --- a/spec/datadog/tracing/contrib/suite/integration_spec.rb +++ b/spec/datadog/tracing/contrib/suite/integration_spec.rb @@ -8,7 +8,7 @@ require 'rack' # `Rack::Handler::WEBrick` was extracted to the `rackup` gem in Rack 3.0 -require 'rackup' if Gem::Version.new(Rack::RELEASE) >= Gem::Version.new('3') +require 'rackup/handler/webrick' if Gem::Version.new(Rack::RELEASE) >= Gem::Version.new('3') require 'webrick' RSpec.describe 'contrib integration testing', :integration do @@ -164,7 +164,11 @@ def build(*dynamic_configurations) end end.to_app - server.mount '/', Rack::Handler::WEBrick, app + if Gem::Version.new(Rack::RELEASE) >= Gem::Version.new('3') + server.mount '/', Rackup::Handler::WEBrick, app + else + server.mount '/', Rack::Handler::WEBrick, app + end @thread = Thread.new { server.start } try_wait_until { started }