@@ -33,6 +33,7 @@ def run_rspec_with_formatter(formatter, options={})
33
33
34
34
runner = RSpec ::Core ::Runner . new ( options )
35
35
configuration = runner . configuration
36
+ configuration . filter_gems_from_backtrace "gems/bundler"
36
37
configuration . backtrace_formatter . exclusion_patterns << /rspec_with_simplecov/
37
38
configuration . backtrace_formatter . inclusion_patterns = [ ]
38
39
@@ -41,6 +42,7 @@ def run_rspec_with_formatter(formatter, options={})
41
42
runner . run ( err , out )
42
43
out . string
43
44
end
45
+ RUN_LINE = __LINE__ - 3
44
46
45
47
def normalize_durations ( output )
46
48
output . gsub ( /(?:\d + minutes? )?\d +(?:\. \d +)?(s| seconds?)/ ) do |dur |
@@ -66,7 +68,7 @@ def expected_summary_output_for_example_specs
66
68
|
67
69
| (compared using ==)
68
70
| # ./spec/rspec/core/resources/formatter_specs.rb:18:in `block (3 levels) in <top (required)>'
69
- | # ./spec/support/formatter_support.rb:41 :in `run_rspec_with_formatter'
71
+ | # ./spec/support/formatter_support.rb:#{ RUN_LINE } :in `run_rspec_with_formatter'
70
72
| # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter'
71
73
| # ./spec/support/sandboxing.rb:16:in `block (3 levels) in <top (required)>'
72
74
| # ./spec/support/sandboxing.rb:7:in `block (2 levels) in <top (required)>'
@@ -86,7 +88,7 @@ def expected_summary_output_for_example_specs
86
88
|
87
89
| (compared using ==)
88
90
| # ./spec/rspec/core/resources/formatter_specs.rb:37:in `block (2 levels) in <top (required)>'
89
- | # ./spec/support/formatter_support.rb:41 :in `run_rspec_with_formatter'
91
+ | # ./spec/support/formatter_support.rb:#{ RUN_LINE } :in `run_rspec_with_formatter'
90
92
| # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter'
91
93
| # ./spec/support/sandboxing.rb:16:in `block (3 levels) in <top (required)>'
92
94
| # ./spec/support/sandboxing.rb:7:in `block (2 levels) in <top (required)>'
@@ -117,7 +119,7 @@ def expected_summary_output_for_example_specs
117
119
| foo
118
120
| # (erb):1:in `<main>'
119
121
| # ./spec/rspec/core/resources/formatter_specs.rb:50:in `block (2 levels) in <top (required)>'
120
- | # ./spec/support/formatter_support.rb:41 :in `run_rspec_with_formatter'
122
+ | # ./spec/support/formatter_support.rb:#{ RUN_LINE } :in `run_rspec_with_formatter'
121
123
| # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter'
122
124
| # ./spec/support/sandboxing.rb:16:in `block (3 levels) in <top (required)>'
123
125
| # ./spec/support/sandboxing.rb:7:in `block (2 levels) in <top (required)>'
0 commit comments