File: curl-error-message.patch

package info (click to toggle)
ruby-typhoeus 1.4.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 636 kB
  • sloc: ruby: 4,381; makefile: 6
file content (28 lines) | stat: -rw-r--r-- 1,141 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Author: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Fri, 2 Aug 2024 11:46:52 +0900
Description: [PATCH] TEST: support curl 8.9 error message
 With
 https://github.com/curl/curl/commit/c074ba64a86c36bbb697b89e1b3509fd14d12af3
 curl changes the error message with CURLE_COULDNT_CONNECT and
 so on. Modify typheous side test code to support this curl
 change.

Closes #723 .
Origin: https://github.com/typhoeus/typhoeus/commit/a29ff8a77bafeb35d95ebddeb959c4129a783d06.patch
---
 spec/typhoeus/response/informations_spec.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spec/typhoeus/response/informations_spec.rb b/spec/typhoeus/response/informations_spec.rb
index 4b863067..8146164c 100644
--- a/spec/typhoeus/response/informations_spec.rb
+++ b/spec/typhoeus/response/informations_spec.rb
@@ -24,7 +24,7 @@
     let(:options) { { :return_code => :couldnt_connect } }
 
     it "returns a message" do
-      expect(response.return_message).to eq("Couldn't connect to server")
+      expect(response.return_message).to match(/(Couldn't|Could not) connect to server/)
     end
 
     describe "with nil return_code" do