File: fix_first_caller_from_outside_rspec.patch

package info (click to toggle)
ruby-rspec-core 2.14.7-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,756 kB
  • ctags: 1,195
  • sloc: ruby: 12,708; makefile: 14
file content (19 lines) | stat: -rw-r--r-- 754 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: adapt first_caller_from_outside_rspec to installation path on Debian
 the path of RSpec in Debian does not match /lib/rspec/core
 This was causing file_path metadata to be wrong, breaking file_path filters.
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737734
Author: Cédric Boutillier <boutil@debian.org>
Forwarded: not-needed
Last-Update: 2014-02-06

--- a/lib/rspec/core/metadata.rb
+++ b/lib/rspec/core/metadata.rb
@@ -88,7 +88,7 @@
         end
 
         def first_caller_from_outside_rspec
-          self[:caller].detect {|l| l !~ /\/lib\/rspec\/core/}
+          self[:caller].detect {|l| l !~ /\/(lib|vendor_ruby)\/rspec\/core/}
         end
 
         def method_description_after_module?(parent_part, child_part)