Skip to content

Commit c0056a1

Browse files
committed
Fix FileUtils#ln_sr
Multiple source paths is not allowed with `target_directory: false`.
1 parent 8c362dc commit c0056a1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/stdlib/FileUtils_test.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ def test_ln_s
319319
FileUtils, :ln_s, "src", "dest"
320320
assert_send_type "(ToStr, ToStr, noop: bool) -> void",
321321
FileUtils, :ln_s, ToStr.new("src"), ToStr.new("dest"), noop: true
322+
assert_send_type "(ToPath, ToPath, noop: bool) -> void",
323+
FileUtils, :ln_sr, ToPath.new("src"), ToPath.new("dest"), noop: true
322324
assert_send_type "(Array[String | ToStr | ToPath], String, noop: bool) -> void",
323325
FileUtils, :ln_s, ["src", ToStr.new("src"), ToPath.new("src")], "dest_dir", noop: true
324326
assert_send_type "(ToPath, ToPath, force: nil, noop: bool, verbose: bool, target_directory: bool, relative: bool) -> void",
@@ -360,8 +362,10 @@ def test_ln_sr
360362
FileUtils, :ln_sr, ToStr.new("src"), ToStr.new("dest"), noop: true
361363
assert_send_type "(ToPath, ToPath, noop: bool) -> void",
362364
FileUtils, :ln_sr, ToPath.new("src"), ToPath.new("dest"), noop: true
363-
assert_send_type "(Array[String | ToStr | ToPath], String, noop: bool, verbose: bool, target_directory: false) -> void",
364-
FileUtils, :ln_sr, ["src", ToStr.new("src"), ToStr.new("src")], "dest_dir", noop: true, verbose: false, target_directory: false
365+
assert_send_type "(Array[String | ToStr | ToPath], String, noop: bool, verbose: bool) -> void",
366+
FileUtils, :ln_sr, ["src", ToStr.new("src"), ToStr.new("src")], "dest_dir", noop: true, verbose: false
367+
assert_send_type "(ToPath, ToPath, force: nil, noop: bool, verbose: bool, target_directory: bool) -> void",
368+
FileUtils, :ln_sr, ToPath.new("src"), ToPath.new("dest"), force: nil, noop: true, verbose: false, relative: false, target_directory: false
365369
end
366370
end
367371

0 commit comments

Comments
 (0)