Fix failing test due to the relative path output of minitest
minitest has been updated to output relative paths for failures at v5.21.0
e410bade17
This patch fixes test to pass regardless of minitest versions.
This commit is contained in:
parent
a255742b2e
commit
5853ff19eb
@ -73,7 +73,7 @@ def test_output_inline_by_default
|
||||
create_test_file "post", pass: false
|
||||
|
||||
output = run_test_command("test/post_test.rb")
|
||||
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}
|
||||
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}
|
||||
assert_match expect, output
|
||||
end
|
||||
|
||||
|
@ -27,7 +27,7 @@ def test_rerun_snippet_is_relative_path
|
||||
create_test_file "post", pass: false
|
||||
|
||||
output = run_test_command("test/post_test.rb")
|
||||
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}
|
||||
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}
|
||||
assert_match expect, output
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user