[DRE-commits] [ruby-typhoeus] 02/03: Add patch fix-spec-for-ruby2_3.patch
Thiago Ribeiro
thiagovsk-guest at moszumanska.debian.org
Tue Mar 15 19:39:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
thiagovsk-guest pushed a commit to branch master
in repository ruby-typhoeus.
commit 0110b480081f62e4be414d7587c5c4551225adfd
Author: Thiago Ribeiro <thiagitosouza at gmail.com>
Date: Tue Mar 15 16:01:47 2016 -0300
Add patch fix-spec-for-ruby2_3.patch
---
debian/patches/fix-specs-for-ruby2_3.patch | 36 ++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 37 insertions(+)
diff --git a/debian/patches/fix-specs-for-ruby2_3.patch b/debian/patches/fix-specs-for-ruby2_3.patch
new file mode 100644
index 0000000..47e395a
--- /dev/null
+++ b/debian/patches/fix-specs-for-ruby2_3.patch
@@ -0,0 +1,36 @@
+Description: Fix specs for Ruby 2.3
+Author: Sebastian Skalacki <skalee at gmail.com>
+Applied-Upstream: https://github.com/typhoeus/typhoeus/pull/514
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=816360
+Last-Update: 2016-03-15
+--- a/spec/typhoeus/hydra/runnable_spec.rb
++++ b/spec/typhoeus/hydra/runnable_spec.rb
+@@ -106,8 +106,9 @@
+ end
+ let(:second) { Typhoeus::Request.new("localhost:3001/second") }
+ let(:requests) { [first] }
++ let(:on_complete_counter){ double :mark => :twain }
+
+- before { Typhoeus.on_complete { |r| String.new(r.code) } }
++ before { Typhoeus.on_complete { |r| on_complete_counter.mark } }
+ after { Typhoeus.on_complete.clear; Typhoeus.before.clear }
+
+ context "when real request" do
+@@ -115,7 +116,7 @@
+ let(:options) { {} }
+
+ it "calls on_complete callback once for every response" do
+- expect(String).to receive(:new).exactly(2).times
++ expect(on_complete_counter).to receive(:mark).exactly(2).times
+ hydra.run
+ end
+ end
+@@ -126,7 +127,7 @@
+ before { Typhoeus.before{ |request| request.finish(Typhoeus::Response.new) } }
+
+ it "simulates real multi run and adds and finishes both requests" do
+- expect(String).to receive(:new).exactly(2).times
++ expect(on_complete_counter).to receive(:mark).exactly(2).times
+ hydra.run
+ end
+ end
diff --git a/debian/patches/series b/debian/patches/series
index 005fb51..1e4b6cf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+fix-specs-for-ruby2_3.patch
remove-rubygems-bundler.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-typhoeus.git
More information about the Pkg-ruby-extras-commits
mailing list