[DRE-commits] [ruby-rspec] 18/19: Patch escape

Jérémy Bobbio lunar at alioth.debian.org
Sun Oct 20 17:01:31 UTC 2013


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/multideb
in repository ruby-rspec.

commit 159d77707aa5cc2bd24f26ee210c1b0cce754781
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sun Oct 20 15:46:02 2013 +0200

    Patch escape
---
 debian/patches/escape-path-in-match.patch |   31 +++++++++++++++++++++++++++++
 debian/patches/series                     |    1 +
 2 files changed, 32 insertions(+)

diff --git a/debian/patches/escape-path-in-match.patch b/debian/patches/escape-path-in-match.patch
new file mode 100644
index 0000000..9dbbd9e
--- /dev/null
+++ b/debian/patches/escape-path-in-match.patch
@@ -0,0 +1,31 @@
+--- a/rspec-core/spec/rspec/core/memoized_helpers_spec.rb
++++ b/rspec-core/spec/rspec/core/memoized_helpers_spec.rb
+@@ -177,7 +177,7 @@ module RSpec::Core
+             values = define_and_run_group
+ 
+             expect(msgs).to include(*values[:reference_lines].map { |line|
+-              match(/subject accessed.*#{__FILE__}:#{line}/m)
++              match(/subject accessed.*#{Regexp.escape(__FILE__)}:#{line}/m)
+             })
+           end
+         end
+@@ -612,7 +612,7 @@ module RSpec::Core
+         values = define_and_run_group
+ 
+         expect(msgs).to include(*values[:reference_lines].map { |line|
+-          match(/let declaration `list` accessed.*#{__FILE__}:#{line}/m)
++          match(/let declaration `list` accessed.*#{Regexp.escape(__FILE__)}:#{line}/m)
+         })
+       end
+     end
+--- a/rspec-mocks/spec/rspec/mocks/nil_expectation_warning_spec.rb
++++ b/rspec-mocks/spec/rspec/mocks/nil_expectation_warning_spec.rb
+@@ -13,7 +13,7 @@ module RSpec
+   module Mocks
+     describe "an expectation set on nil" do
+       it "issues a warning with file and line number information" do
+-        expected_warning = %r%An expectation of :foo was set on nil. Called from #{__FILE__}:#{__LINE__+3}(:in .+)?. Use allow_message_expectations_on_nil to disable warnings.%
++        expected_warning = %r%An expectation of :foo was set on nil. Called from #{Regexp.escape(__FILE__)}:#{__LINE__+3}(:in .+)?. Use allow_message_expectations_on_nil to disable warnings.%
+         Kernel.should_receive(:warn).with(expected_warning)
+ 
+         nil.should_receive(:foo)
diff --git a/debian/patches/series b/debian/patches/series
index 16bfe7f..cbfd900 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ remove-aruba-stuff-in-tests.patch
 fix-commandline-test.patch
 ruby_test_bin.patch
 fix_encoding.patch
+escape-path-in-match.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rspec.git



More information about the Pkg-ruby-extras-commits mailing list