diff --git a/spec/nice_http/nice_http_spec.rb b/spec/nice_http/nice_http_spec.rb index 04bd6cb..62bbcd3 100644 --- a/spec/nice_http/nice_http_spec.rb +++ b/spec/nice_http/nice_http_spec.rb @@ -172,7 +172,7 @@ it 'returns error if timeout reached when connecting' do klass.timeout = 2 http = klass.new("http://example.com:8888") rescue err = $ERROR_INFO - expect(err.message).to match /execution expired/i + expect(err.message).to match /(execution expired|Failed to open TCP connection)/i end end