diff options
Diffstat (limited to 'test/rubygems/test_gem_commands_sources_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_sources_command.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/rubygems/test_gem_commands_sources_command.rb b/test/rubygems/test_gem_commands_sources_command.rb index 40449bec22..7dea7971d2 100644 --- a/test/rubygems/test_gem_commands_sources_command.rb +++ b/test/rubygems/test_gem_commands_sources_command.rb @@ -42,12 +42,11 @@ class TestGemCommandsSourcesCommand < Gem::TestCase def test_execute_add util_setup_fake_fetcher - si = Gem::SourceIndex.new - si.add_spec @a1 + install_specs @a1 - specs = si.map do |_, spec| + specs = Gem::Specification.map { |spec| [spec.name, spec.version, spec.original_platform] - end + } specs_dump_gz = StringIO.new Zlib::GzipWriter.wrap specs_dump_gz do |io| @@ -187,18 +186,18 @@ beta-gems.example.com is not a URI @cmd.handle_options %w[--update] util_setup_fake_fetcher - source_index = util_setup_spec_fetcher @a1 + util_setup_spec_fetcher @a1 - specs = source_index.map do |name, spec| + specs = Gem::Specification.map { |spec| [spec.name, spec.version, spec.original_platform] - end + } @fetcher.data["#{@gem_repo}specs.#{Gem.marshal_version}.gz"] = util_gzip Marshal.dump(specs) - latest_specs = source_index.latest_specs.map do |spec| + latest_specs = Gem::Specification.latest_specs.map { |spec| [spec.name, spec.version, spec.original_platform] - end + } @fetcher.data["#{@gem_repo}latest_specs.#{Gem.marshal_version}.gz"] = util_gzip Marshal.dump(latest_specs) |