[DRE-commits] [SCM] ruby-rr.git branch, master, updated. debian/1.1.1-1-3-g461187d
Praveen Arimbrathodiyil
praveen at debian.org
Mon Jun 24 21:08:41 UTC 2013
The following commit has been merged in the master branch:
commit 8d0d78602c2091294325b793767ddb599daab535
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Tue Jun 25 00:49:30 2013 +0530
import upstream patch to add back RR::Adapters::RSpec2
diff --git a/debian/patches/add-back-adapters-rspec2.patch b/debian/patches/add-back-adapters-rspec2.patch
new file mode 100644
index 0000000..5055db2
--- /dev/null
+++ b/debian/patches/add-back-adapters-rspec2.patch
@@ -0,0 +1,82 @@
+From 1e1d18f3ae9bdcae1f5fa3541b0c2d5fe8375237 Mon Sep 17 00:00:00 2001
+From: Elliot Winkler <elliot.winkler at gmail.com>
+Date: Sat, 22 Jun 2013 14:37:30 -0600
+Subject: [PATCH] Add back RR::Adapters::RSpec2 (fixes #34)
+
+This was introduced in 1.0.5 and then removed in favor of the RSpec-2 autohook
+mechanism. Unfortunately it seems that the sham_rack started using, and still
+uses, this, so we need to bring it back so its tests will run.
+---
+ lib/rr/adapters.rb | 5 +++++
+ lib/rr/without_autohook.rb | 2 +-
+ spec/suites/rspec_2/integration/rspec_2_spec.rb | 19 +++++++++++++++++++
+ 3 files changed, 25 insertions(+), 1 deletion(-)
+
+diff --git a/lib/rr/adapters.rb b/lib/rr/adapters.rb
+index d5f76f1..af69a08 100644
+--- a/lib/rr/adapters.rb
++++ b/lib/rr/adapters.rb
+@@ -43,5 +43,10 @@ def show_warning_for(adapter_const_name)
+ EOT
+ end
+ end
++
++ module RSpec2
++ include RR::Integrations::RSpec2::Mixin
++ include RR::Adapters::RRMethods
++ end
+ end
+ end
+diff --git a/lib/rr/without_autohook.rb b/lib/rr/without_autohook.rb
+index bfa5391..7c820c0 100644
+--- a/lib/rr/without_autohook.rb
++++ b/lib/rr/without_autohook.rb
+@@ -85,7 +85,6 @@
+ require 'rr/spy_verification_proxy'
+ require 'rr/spy_verification'
+
+-require 'rr/adapters'
+ require 'rr/integrations'
+ require 'rr/integrations/decorator'
+ require 'rr/integrations/rspec/invocation_matcher'
+@@ -100,6 +99,7 @@
+ require 'rr/integrations/test_unit_200_active_support'
+ require 'rr/integrations/test_unit_2'
+ require 'rr/integrations/test_unit_2_active_support'
++require 'rr/adapters'
+
+ require 'rr/version'
+
+diff --git a/spec/suites/rspec_2/integration/rspec_2_spec.rb b/spec/suites/rspec_2/integration/rspec_2_spec.rb
+index 31bc439..f507d32 100644
+--- a/spec/suites/rspec_2/integration/rspec_2_spec.rb
++++ b/spec/suites/rspec_2/integration/rspec_2_spec.rb
+@@ -115,6 +115,25 @@ def have_received(method = nil)
+ all_tests_should_pass(output)
+ end
+
++ specify "it is still possible to use RR::Adapters::RSpec2 even though it's deprecated" do
++ suite = with_bootstrap <<-EOT
++ RSpec.configure do |c|
++ c.mock_with RR::Adapters::RSpec2
++ end
++
++ describe 'A test' do
++ it 'is a test' do
++ object = Object.new
++ puts 'ok cool'
++ mock(object).foo
++ object.foo
++ end
++ end
++ EOT
++ output = run_fixture_tests(suite)
++ all_tests_should_pass(output)
++ end
++
+ include AdapterTests
+ instance_methods.each do |method_name|
+ if method_name =~ /^test_(.+)$/
+--
+1.8.1.6
+
diff --git a/debian/patches/series b/debian/patches/series
index c9f1789..c9acf66 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
use_moved_VERSION.patch
+add-back-adapters-rspec2.patch
--
ruby-rr.git
More information about the Pkg-ruby-extras-commits
mailing list