Skip to content

Commit 0bd8a69

Browse files
authored
Merge pull request rails#50724 from aeroastro/feature/fix-minitest-dependency
Fix failing test due to the relative path output of minitest at v5.21.0
2 parents a255742 + 5853ff1 commit 0bd8a69

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

railties/test/generators/plugin_test_runner_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_output_inline_by_default
7373
create_test_file "post", pass: false
7474

7575
output = run_test_command("test/post_test.rb")
76-
expect = %r{Running:\n\nPostTest\nF\n\nFailure:\nPostTest#test_truth \[[^\]]+test/post_test.rb:6\]:\nwups!\n\nbin/test (/private)?#{plugin_path}/test/post_test.rb:4}
76+
expect = %r{Running:\n\nPostTest\nF\n\nFailure:\nPostTest#test_truth \[.*?test/post_test.rb:6\]:\nwups!\n\nbin/test (/private)?#{plugin_path}/test/post_test.rb:4}
7777
assert_match expect, output
7878
end
7979

railties/test/generators/test_runner_in_engine_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_rerun_snippet_is_relative_path
2727
create_test_file "post", pass: false
2828

2929
output = run_test_command("test/post_test.rb")
30-
expect = %r{Running:\n\nPostTest\nF\n\nFailure:\nPostTest#test_truth \[[^\]]+test/post_test\.rb:6\]:\nwups!\n\nbin/rails test test/post_test\.rb:4}
30+
expect = %r{Running:\n\nPostTest\nF\n\nFailure:\nPostTest#test_truth \[.*?test/post_test\.rb:6\]:\nwups!\n\nbin/rails test test/post_test\.rb:4}
3131
assert_match expect, output
3232
end
3333

0 commit comments

Comments
 (0)