summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_local_remote_options.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_local_remote_options.rb')
-rw-r--r--test/rubygems/test_gem_local_remote_options.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_local_remote_options.rb b/test/rubygems/test_gem_local_remote_options.rb
index 0141a3150d..90142efb8f 100644
--- a/test/rubygems/test_gem_local_remote_options.rb
+++ b/test/rubygems/test_gem_local_remote_options.rb
@@ -40,6 +40,8 @@ class TestGemLocalRemoteOptions < Gem::TestCase
end
def test_clear_sources_option_idiot_proof
+ util_setup_fake_fetcher
+
@cmd.add_local_remote_options
@cmd.handle_options %W[--clear-sources]
assert_equal Gem.default_sources, Gem.sources
@@ -78,10 +80,14 @@ class TestGemLocalRemoteOptions < Gem::TestCase
s4 = URI.parse 'http://more-gems.example.com/' # Intentional duplicate
original_sources = Gem.sources.dup
+
@cmd.handle_options %W[--source #{s1} --source #{s2} --source #{s3} --source #{s4}]
- assert_equal [original_sources, s1.to_s, s2.to_s, "#{s3}/"].flatten,
- Gem.sources
+ original_sources << s1.to_s
+ original_sources << s2.to_s
+ original_sources << "#{s3}/"
+
+ assert_equal original_sources, Gem.sources
end
def test_update_sources_option