diff --git a/test/error_handling_test.rb b/test/error_handling_test.rb index d4377e6..3247e4a 100644 --- a/test/error_handling_test.rb +++ b/test/error_handling_test.rb @@ -82,7 +82,10 @@ def test_proxy_error_handling Wreq.get(url, proxy: proxy, timeout: 5) flunk "Expected proxy connection error but got response" rescue => e - assert_instance_of Wreq::ProxyConnectionError, e + assert( + e.is_a?(Wreq::ProxyConnectionError) || e.is_a?(Wreq::RequestError), + "Expected ProxyConnectionError or RequestError, got #{e.class}: #{e.message}" + ) end end end