disable-network-tests.patch 2.62 KB
Newer Older
1 2 3 4 5
Description: Disable the tests accessing the network
Author: Matthias Klose <doko@ubuntu.com>
Origin: vendor
Forwarded: not-needed

6 7 8
--- a/spec/lib/http/client_spec.rb
+++ b/spec/lib/http/client_spec.rb
@@ -88,7 +88,7 @@
9 10 11 12 13 14 15 16
     end
 
     context "with non-ASCII URLs" do
-      it "theoretically works like a charm" do
+      xit "theoretically works like a charm" do
         client = StubbedClient.new(:follow => true).stub(
           "http://example.com/"      => redirect_response("/könig"),
           "http://example.com/könig" => simple_response("OK")
17
@@ -97,7 +97,7 @@
18 19 20 21 22 23 24 25
         expect { client.get "http://example.com/könig" }.not_to raise_error
       end
 
-      it "works like a charm in real world" do
+      xit "works like a charm in real world" do
         url    = "http://git.io/jNeY"
         client = HTTP.follow
         expect(client.get(url).to_s).to include "support for non-ascii URIs"
26
@@ -207,12 +207,12 @@
27 28 29 30 31 32 33 34 35 36 37 38 39 40
 
   describe "#request" do
     context "with non-ASCII URLs" do
-      it "theoretically works like a charm" do
+      xit "theoretically works like a charm" do
         client = described_class.new
         expect { client.get "#{dummy.endpoint}/könig" }.not_to raise_error
       end
 
-      it "works like a charm in real world" do
+      xit "works like a charm in real world" do
         url     = "https://github.com/httprb/http.rb/pull/197/ö無"
         client  = HTTP.follow
         expect(client.get(url).to_s).to include "support for non-ascii URIs"
41
@@ -223,7 +223,7 @@
42 43 44 45 46 47 48 49
       let(:headers) { {"Host" => "another.example.com"} }
       let(:client)  { described_class.new :headers => headers }
 
-      it "keeps `Host` header as is" do
+      xit "keeps `Host` header as is" do
         expect(client).to receive(:perform) do |req, _|
           expect(req["Host"]).to eq "another.example.com"
         end
50 51
--- a/spec/lib/http_spec.rb
+++ b/spec/lib/http_spec.rb
52
@@ -278,16 +278,16 @@
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
 
     context "with host only given" do
       subject { HTTP.persistent host }
-      it { is_expected.to be_an HTTP::Client }
-      it { is_expected.to be_persistent }
+      xit { is_expected.to be_an HTTP::Client }
+      xit { is_expected.to be_persistent }
     end
 
     context "with host and block given" do
-      it "returns last evaluation of last expression" do
+      xit "returns last evaluation of last expression" do
         expect(HTTP.persistent(host) { :http }).to be :http
       end
 
-      it "auto-closes connection" do
+      xit "auto-closes connection" do
         HTTP.persistent host do |client|
           expect(client).to receive(:close).and_call_original
           client.get("/repos/httprb/http.rb")