This repository was archived by the owner on Nov 30, 2024. It is now read-only.
File tree 1 file changed +8
-2
lines changed
spec/rspec/core/formatters
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -201,15 +201,15 @@ def run_all_and_dump_failures
201
201
it "does not show the error class" do
202
202
group . example ( "example name" ) { expect ( "this" ) . to eq ( "that" ) }
203
203
run_all_and_dump_failures
204
- expect ( formatter_output . string ) . not_to match ( /RSpec::/m )
204
+ expect ( formatter_output_without_formatter_module ) . not_to match ( /RSpec::/m )
205
205
end
206
206
end
207
207
208
208
context "with a failed message expectation (rspec-mocks)" do
209
209
it "does not show the error class" do
210
210
group . example ( "example name" ) { expect ( "this" ) . to receive ( "that" ) }
211
211
run_all_and_dump_failures
212
- expect ( formatter_output . string ) . not_to match ( /RSpec::/m )
212
+ expect ( formatter_output_without_formatter_module ) . not_to match ( /RSpec::/m )
213
213
end
214
214
end
215
215
@@ -293,4 +293,10 @@ def run_all_and_dump_failures
293
293
expect ( formatter_output . string ) . to include ( "\e [36m" )
294
294
end
295
295
end
296
+
297
+ # Ruby 3.4 includes modules names in stack traces but two of our tests are looking for RSpec module names, remove
298
+ # this one as it is considered 'safe'
299
+ def formatter_output_without_formatter_module
300
+ formatter_output . string . tr ( 'RSpec::ExampleGroups::RSpecCoreFormattersBaseTextFormatter::DumpFailures#' , '' )
301
+ end
296
302
end
You can’t perform that action at this time.
0 commit comments