diff --git a/spec/support/proxy_server.rb b/spec/support/proxy_server.rb index 8700acf9..95214141 100644 --- a/spec/support/proxy_server.rb +++ b/spec/support/proxy_server.rb @@ -18,14 +18,8 @@ :RequestCallback => handler ) -Thread.new { ProxyServer.start } -trap("INT") do - ProxyServer.shutdown - exit -end +Thread.new { ProxyServer.start } +at_exit { ProxyServer.shutdown } -Thread.new { AuthenticatedProxyServer.start } -trap("INT") do - AuthenticatedProxyServer.shutdown - exit -end +Thread.new { AuthenticatedProxyServer.start } +at_exit { AuthenticatedProxyServer.shutdown }