We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c3e63e1 + 682526f commit c012a32Copy full SHA for c012a32
ruby/lib/minitest/queue.rb
@@ -144,7 +144,7 @@ def self.project_root
144
145
def self.relative_path(path, root: project_root)
146
Pathname(path).relative_path_from(Pathname(root)).to_s
147
- rescue ArgumentError
+ rescue ArgumentError, TypeError
148
path
149
end
150
ruby/test/minitest/queue/run_command_formatter_test.rb
@@ -62,5 +62,10 @@ def test_relative_path_with_empty_path
62
path = Minitest::Queue.relative_path('', root: '/home/willem/src/project')
63
assert_equal "", path
64
65
+
66
+ def test_relative_path_with_nil_path
67
+ path = Minitest::Queue.relative_path(nil, root: '/home/willem/src/project')
68
+ refute path
69
+ end
70
71
0 commit comments