Skip to content

Commit 5de0c80

Browse files
committed
Merge pull request ruby#1 from nobu/patch-2
fake ALT_SEPARATOR
2 parents 3f752b7 + 1c59aaa commit 5de0c80

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test/rubygems/test_gem_installer.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,9 @@ def test_generate_bin_symlink_update_remove_wrapper
574574
def test_generate_bin_symlink_win32
575575
old_win_platform = Gem.win_platform?
576576
Gem.win_platform = true
577+
old_alt_separator = File::ALT_SEPARATOR
578+
File.__send__(:remove_const, :ALT_SEPARATOR)
579+
File::ALT_SEPARATOR = '\\'
577580
@installer.wrappers = false
578581
util_make_exec
579582
@installer.gem_dir = util_gem_dir
@@ -592,6 +595,8 @@ def test_generate_bin_symlink_win32
592595
wrapper = File.read installed_exec
593596
assert_match(/generated by RubyGems/, wrapper)
594597
ensure
598+
File.__send__(:remove_const, :ALT_SEPARATOR)
599+
File::ALT_SEPARATOR = old_alt_separator
595600
Gem.win_platform = old_win_platform
596601
end
597602

0 commit comments

Comments
 (0)