[DRE-commits] [ruby-rspec] 24/25: update escape-path-in-match.patch

Cédric Boutillier boutil at moszumanska.debian.org
Sat Mar 28 20:34:14 UTC 2015


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

boutil pushed a commit to branch no_submodules
in repository ruby-rspec.

commit 824e0639828489e82d4a91c7475cf01d7a778742
Author: Cédric Boutillier <boutil at debian.org>
Date:   Sat Mar 28 21:28:19 2015 +0100

    update escape-path-in-match.patch
---
 debian/patches/escape-path-in-match.patch | 52 +++++++++++++++----------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/debian/patches/escape-path-in-match.patch b/debian/patches/escape-path-in-match.patch
index 3db75af..d1ba5bf 100644
--- a/debian/patches/escape-path-in-match.patch
+++ b/debian/patches/escape-path-in-match.patch
@@ -1,42 +1,42 @@
 --- 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
+@@ -185,7 +185,7 @@
+             end.run
  
-             expect(msgs).to include(*values[:reference_lines].map { |line|
--              match(/subject accessed.*#{__FILE__}:#{line}/m)
-+              match(/subject accessed.*#{Regexp.escape(__FILE__)}:#{line}/m)
-             })
+             expect(result).to be_an(Exception)
+-            expect(result.message).to match(/subject accessed.*#{hook}\(:context\).*#{__FILE__}:#{line}/m)
++            expect(result.message).to match(/subject accessed.*#{hook}\(:context\).*#{Regexp.escape(__FILE__)}:#{line}/m)
            end
          end
-@@ -612,7 +612,7 @@ module RSpec::Core
-         values = define_and_run_group
+       end
+@@ -460,7 +460,7 @@
+         end.run
  
-         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)
-         })
+         expect(result).to be_an(Exception)
+-        expect(result.message).to match(/let declaration `foo` accessed.*#{hook}\(:context\).*#{__FILE__}:#{line}/m)
++        expect(result.message).to match(/let declaration `foo` accessed.*#{hook}\(:context\).*#{Regexp.escape(__FILE__)}:#{line}/m)
        end
      end
---- a/rspec-core/lib/rspec/core/backtrace_cleaner.rb
-+++ b/rspec-core/lib/rspec/core/backtrace_cleaner.rb
-@@ -18,7 +18,7 @@ module RSpec
-         @exclusion_patterns = exclusion_patterns
  
-         if inclusion_patterns.nil?
--          @inclusion_patterns = (matches_an_exclusion_pattern? Dir.getwd) ? [Regexp.new(Dir.getwd)] : []
-+          @inclusion_patterns = (matches_an_exclusion_pattern? Dir.getwd) ? [Regexp.new(Regexp.escape(Dir.getwd))] : []
-         else
-           @inclusion_patterns = inclusion_patterns
-         end
+--- a/rspec-core/lib/rspec/core/backtrace_formatter.rb
++++ b/rspec-core/lib/rspec/core/backtrace_formatter.rb
+@@ -16,7 +16,7 @@
+         @inclusion_patterns = []
+ 
+         return unless matches?(@exclusion_patterns, File.join(Dir.getwd, "lib", "foo.rb:13"))
+-        inclusion_patterns << Regexp.new(Dir.getwd)
++        inclusion_patterns << Regexp.new(Regexp.escape(Dir.getwd))
+       end
+ 
+       attr_writer :full_backtrace
 --- 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
+@@ -2,7 +2,7 @@
    module Mocks
-     describe "an expectation set on nil" do
+     RSpec.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)
+         expect(Kernel).to receive(:warn).with(expected_warning)
  
-         nil.should_receive(:foo)
+         expect(nil).to receive(:foo)

-- 
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