aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_sources_command.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-22 02:52:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-22 02:52:35 +0000
commitb551e8c8b36766651be4e782e09e3b02e7d14a10 (patch)
treee164a1ef908bd4451568abf05b688f1593915b81 /test/rubygems/test_gem_commands_sources_command.rb
parent65544f575b25b18dc27f9364f973556ddb48538f (diff)
downloadruby-b551e8c8b36766651be4e782e09e3b02e7d14a10.tar.gz
* lib/rubygems: update to 1.3.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_sources_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_sources_command.rb69
1 files changed, 0 insertions, 69 deletions
diff --git a/test/rubygems/test_gem_commands_sources_command.rb b/test/rubygems/test_gem_commands_sources_command.rb
index 77df59b16d..34632ea5f1 100644
--- a/test/rubygems/test_gem_commands_sources_command.rb
+++ b/test/rubygems/test_gem_commands_sources_command.rb
@@ -115,48 +115,9 @@ beta-gems.example.com is not a URI
assert_equal '', @ui.error
end
- def test_execute_add_legacy
- util_setup_fake_fetcher
- util_setup_source_info_cache
-
- si = Gem::SourceIndex.new
- si.add_spec @a1
-
- @fetcher.data["#{@new_repo}/yaml"] = ''
-
- @cmd.handle_options %W[--add #{@new_repo}]
-
- use_ui @ui do
- @cmd.execute
- end
-
- assert_equal [@gem_repo], Gem.sources
-
- expected = <<-EOF
-WARNING: RubyGems 1.2+ index not found for:
-\t#{@new_repo}
-
-Will cause RubyGems to revert to legacy indexes, degrading performance.
- EOF
-
- assert_equal "#{@new_repo} added to sources\n", @ui.output
- assert_equal expected, @ui.error
- end
-
def test_execute_clear_all
@cmd.handle_options %w[--clear-all]
- util_setup_source_info_cache
-
- cache = Gem::SourceInfoCache.cache
- cache.update
- cache.write_cache
-
- assert File.exist?(cache.system_cache_file),
- 'system cache file'
- assert File.exist?(cache.latest_system_cache_file),
- 'latest system cache file'
-
util_setup_spec_fetcher
fetcher = Gem::SpecFetcher.fetcher
@@ -179,11 +140,6 @@ Will cause RubyGems to revert to legacy indexes, degrading performance.
assert_equal expected, @ui.output
assert_equal '', @ui.error
- refute File.exist?(cache.system_cache_file),
- 'system cache file'
- refute File.exist?(cache.latest_system_cache_file),
- 'latest system cache file'
-
refute File.exist?(fetcher.dir), 'cache dir removed'
end
@@ -249,30 +205,5 @@ Will cause RubyGems to revert to legacy indexes, degrading performance.
assert_equal '', @ui.error
end
- def test_execute_update_legacy
- @cmd.handle_options %w[--update]
-
- util_setup_fake_fetcher
- util_setup_source_info_cache
- Gem::SourceInfoCache.reset
-
- si = Gem::SourceIndex.new
- si.add_spec @a1
- @fetcher.data["#{@gem_repo}yaml"] = YAML.dump si
- @fetcher.data["#{@gem_repo}Marshal.#{@marshal_version}"] = si.dump
-
- use_ui @ui do
- @cmd.execute
- end
-
- expected = <<-EOF
-Bulk updating Gem source index for: #{@gem_repo}
-source cache successfully updated
- EOF
-
- assert_equal expected, @ui.output
- assert_equal '', @ui.error
- end
-
end