Skip to content

Commit 6341e2d

Browse files
committed
Ignore warnings like warning: net-smtp which is not part of the default gems since Ruby 3.1.0.
This commit addresses the CI failure against Ruby master branch. https://buildkite.com/rails/rails/builds/102575#018c4147-8760-48ac-812c-4e63fbe242fa This failure reproduces since this commit: ruby/ruby@d411d8f * Steps to reproduce Install `ruby 3.3.0dev` ```ruby git clone https://github.com/rails/rails cd rails/railties rm ../Gemfile.lock bundle bin/test test/application/bin_setup_test.rb -n test_bin_setup_output ``` * Without this commit ```ruby $ ruby -v ruby 3.3.0dev (2023-12-16T21:45:33Z master d7d10f3ee8) [x86_64-linux] $ rm ../Gemfile.lock ; bundle ; bin/test test/application/bin_setup_test.rb -n test_bin_setup_output ... snip ... F Failure: ApplicationTests::BinSetupTest#test_bin_setup_output [/home/yahonda/src/github.com/rails/rails/railties/test/application/bin_setup_test.rb:51]: --- expected +++ actual @@ -2,10 +2,12 @@ The Gemfile's dependencies are satisfied == Preparing database == +/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.3.0+0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38: warning: mutex_m was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile or gemspec. Created database 'app_development' Created database 'app_test' == Removing old logs and tempfiles == +/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.3.0+0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38: warning: mutex_m was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile or gemspec. == Restarting application server == " bin/test test/application/bin_setup_test.rb:30 Finished in 12.553516s, 0.0797 runs/s, 0.0797 assertions/s. 1 runs, 1 assertions, 1 failures, 0 errors, 0 skips $ ```
1 parent d88f108 commit 6341e2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

railties/test/application/bin_setup_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_bin_setup_output
4646
output.sub!(/^\[.*?\] Resolving packages\.\.\.$/, "[1/4] Resolving packages...")
4747
output.sub!(/^Done in \d+\.\d+s\.\n/, "Done in 0.00s.\n")
4848
# Ignore warnings such as `Psych.safe_load is deprecated`
49-
output.gsub!(/^warning:\s.*\n/, "")
49+
output.gsub!(/^.*warning:\s.*\n/, "")
5050

5151
assert_equal(<<~OUTPUT, output)
5252
== Installing dependencies ==

0 commit comments

Comments
 (0)