aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_mirror_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_commands_mirror_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_mirror_command.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/rubygems/test_gem_commands_mirror_command.rb b/test/rubygems/test_gem_commands_mirror_command.rb
index 7ddc8b92f8..359ba5481e 100644
--- a/test/rubygems/test_gem_commands_mirror_command.rb
+++ b/test/rubygems/test_gem_commands_mirror_command.rb
@@ -34,7 +34,12 @@ class TestGemCommandsMirrorCommand < RubyGemTestCase
File.open File.join(Gem.user_home, '.gemmirrorrc'), 'w' do |fp|
fp.puts "---"
- fp.puts "- from: file://#{@tempdir}"
+ # tempdir could be a drive+path (under windows)
+ if @tempdir.match(/[a-z]:/i)
+ fp.puts "- from: file:///#{@tempdir}"
+ else
+ fp.puts "- from: file://#{@tempdir}"
+ end
fp.puts " to: #{mirror}"
end
@@ -42,9 +47,9 @@ class TestGemCommandsMirrorCommand < RubyGemTestCase
@cmd.execute
end
- assert File.exist?(File.join(mirror, 'gems', "#{@a0_0_1.full_name}.gem"))
- assert File.exist?(File.join(mirror, 'gems', "#{@a0_0_2.full_name}.gem"))
- assert File.exist?(File.join(mirror, 'gems', "#{@b0_0_2.full_name}.gem"))
+ assert File.exist?(File.join(mirror, 'gems', "#{@a1.full_name}.gem"))
+ assert File.exist?(File.join(mirror, 'gems', "#{@a2.full_name}.gem"))
+ assert File.exist?(File.join(mirror, 'gems', "#{@b2.full_name}.gem"))
assert File.exist?(File.join(mirror, 'gems', "#{@c1_2.full_name}.gem"))
assert File.exist?(File.join(mirror, "Marshal.#{@marshal_version}"))
ensure