summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_resolver_api_specification.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_resolver_api_specification.rb')
-rw-r--r--test/rubygems/test_gem_resolver_api_specification.rb69
1 files changed, 35 insertions, 34 deletions
diff --git a/test/rubygems/test_gem_resolver_api_specification.rb b/test/rubygems/test_gem_resolver_api_specification.rb
index 96e2f3c8c6..2119d73478 100644
--- a/test/rubygems/test_gem_resolver_api_specification.rb
+++ b/test/rubygems/test_gem_resolver_api_specification.rb
@@ -1,14 +1,15 @@
# frozen_string_literal: true
+
require_relative "helper"
class TestGemResolverAPISpecification < Gem::TestCase
def test_initialize
set = Gem::Resolver::APISet.new
data = {
- :name => "rails",
- :number => "3.0.3",
- :platform => Gem::Platform.local.to_s,
- :dependencies => [
+ name: "rails",
+ number: "3.0.3",
+ platform: Gem::Platform.local.to_s,
+ dependencies: [
["bundler", "~> 1.0"],
["railties", "= 3.0.3"],
],
@@ -44,10 +45,10 @@ class TestGemResolverAPISpecification < Gem::TestCase
set = Gem::Resolver::APISet.new repo
data = {
- :name => "rails",
- :number => "3.0.3",
- :platform => "ruby",
- :dependencies => [
+ name: "rails",
+ number: "3.0.3",
+ platform: "ruby",
+ dependencies: [
["bundler", "~> 1.0"],
["railties", "= 3.0.3"],
],
@@ -71,10 +72,10 @@ class TestGemResolverAPISpecification < Gem::TestCase
def test_installable_platform_eh
set = Gem::Resolver::APISet.new
data = {
- :name => "a",
- :number => "1",
- :platform => "ruby",
- :dependencies => [],
+ name: "a",
+ number: "1",
+ platform: "ruby",
+ dependencies: [],
}
a_spec = Gem::Resolver::APISpecification.new set, data
@@ -82,10 +83,10 @@ class TestGemResolverAPISpecification < Gem::TestCase
assert a_spec.installable_platform?
data = {
- :name => "b",
- :number => "1",
- :platform => "cpu-other_platform-1",
- :dependencies => [],
+ name: "b",
+ number: "1",
+ platform: "cpu-other_platform-1",
+ dependencies: [],
}
b_spec = Gem::Resolver::APISpecification.new set, data
@@ -93,10 +94,10 @@ class TestGemResolverAPISpecification < Gem::TestCase
refute b_spec.installable_platform?
data = {
- :name => "c",
- :number => "1",
- :platform => Gem::Platform.local.to_s,
- :dependencies => [],
+ name: "c",
+ number: "1",
+ platform: Gem::Platform.local.to_s,
+ dependencies: [],
}
c_spec = Gem::Resolver::APISpecification.new set, data
@@ -107,10 +108,10 @@ class TestGemResolverAPISpecification < Gem::TestCase
def test_source
set = Gem::Resolver::APISet.new
data = {
- :name => "a",
- :number => "1",
- :platform => "ruby",
- :dependencies => [],
+ name: "a",
+ number: "1",
+ platform: "ruby",
+ dependencies: [],
}
api_spec = Gem::Resolver::APISpecification.new set, data
@@ -123,13 +124,13 @@ class TestGemResolverAPISpecification < Gem::TestCase
fetcher.spec "a", 1
end
- dep_uri = URI(@gem_repo) + "info"
+ dep_uri = Gem::URI(@gem_repo) + "info"
set = Gem::Resolver::APISet.new dep_uri
data = {
- :name => "a",
- :number => "1",
- :platform => "ruby",
- :dependencies => [],
+ name: "a",
+ number: "1",
+ platform: "ruby",
+ dependencies: [],
}
api_spec = Gem::Resolver::APISpecification.new set, data
@@ -147,13 +148,13 @@ class TestGemResolverAPISpecification < Gem::TestCase
end
end
- dep_uri = URI(@gem_repo) + "info"
+ dep_uri = Gem::URI(@gem_repo) + "info"
set = Gem::Resolver::APISet.new dep_uri
data = {
- :name => "j",
- :number => "1",
- :platform => "jruby",
- :dependencies => [],
+ name: "j",
+ number: "1",
+ platform: "jruby",
+ dependencies: [],
}
api_spec = Gem::Resolver::APISpecification.new set, data