@@ -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 |
@@ -67,7 +69,7 @@ def expected_summary_output_for_example_specs
67
69
|
68
70
| (compared using ==)
69
71
| # ./spec/rspec/core/resources/formatter_specs.rb:18
70
- | # ./spec/support/formatter_support.rb:41 :in `run_rspec_with_formatter'
72
+ | # ./spec/support/formatter_support.rb:#{ RUN_LINE } :in `run_rspec_with_formatter'
71
73
| # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter'
72
74
| # ./spec/support/sandboxing.rb:16
73
75
| # ./spec/support/sandboxing.rb:7
@@ -87,7 +89,7 @@ def expected_summary_output_for_example_specs
87
89
|
88
90
| (compared using ==)
89
91
| # ./spec/rspec/core/resources/formatter_specs.rb:37
90
- | # ./spec/support/formatter_support.rb:41 :in `run_rspec_with_formatter'
92
+ | # ./spec/support/formatter_support.rb:#{ RUN_LINE } :in `run_rspec_with_formatter'
91
93
| # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter'
92
94
| # ./spec/support/sandboxing.rb:16
93
95
| # ./spec/support/sandboxing.rb:7
@@ -162,7 +164,7 @@ def expected_summary_output_for_example_specs
162
164
|
163
165
| (compared using ==)
164
166
| # ./spec/rspec/core/resources/formatter_specs.rb:18:in `block (3 levels) in <top (required)>'
165
- | # ./spec/support/formatter_support.rb:41 :in `run_rspec_with_formatter'
167
+ | # ./spec/support/formatter_support.rb:#{ RUN_LINE } :in `run_rspec_with_formatter'
166
168
| # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter'
167
169
| # ./spec/support/sandboxing.rb:16:in `block (3 levels) in <top (required)>'
168
170
| # ./spec/support/sandboxing.rb:7:in `block (2 levels) in <top (required)>'
@@ -182,7 +184,7 @@ def expected_summary_output_for_example_specs
182
184
|
183
185
| (compared using ==)
184
186
| # ./spec/rspec/core/resources/formatter_specs.rb:37:in `block (2 levels) in <top (required)>'
185
- | # ./spec/support/formatter_support.rb:41 :in `run_rspec_with_formatter'
187
+ | # ./spec/support/formatter_support.rb:#{ RUN_LINE } :in `run_rspec_with_formatter'
186
188
| # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter'
187
189
| # ./spec/support/sandboxing.rb:16:in `block (3 levels) in <top (required)>'
188
190
| # ./spec/support/sandboxing.rb:7:in `block (2 levels) in <top (required)>'
@@ -213,7 +215,7 @@ def expected_summary_output_for_example_specs
213
215
| foo
214
216
| # (erb):1:in `<main>'
215
217
| # ./spec/rspec/core/resources/formatter_specs.rb:50:in `block (2 levels) in <top (required)>'
216
- | # ./spec/support/formatter_support.rb:41 :in `run_rspec_with_formatter'
218
+ | # ./spec/support/formatter_support.rb:#{ RUN_LINE } :in `run_rspec_with_formatter'
217
219
| # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter'
218
220
| # ./spec/support/sandboxing.rb:16:in `block (3 levels) in <top (required)>'
219
221
| # ./spec/support/sandboxing.rb:7:in `block (2 levels) in <top (required)>'
0 commit comments