diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-04-13 14:55:47 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-04-13 08:38:46 +0000 |
commit | 0ca9a4e743efb180d7d831a6a69fc9af2cf5e61c (patch) | |
tree | 4c3965af956f1e37f2aac7f478f3f16b6141ec24 /test/rubygems/test_gem_resolver_api_set.rb | |
parent | 1f0974e654bf3c8a7dd321ae898174d942975686 (diff) | |
download | ruby-0ca9a4e743efb180d7d831a6a69fc9af2cf5e61c.tar.gz |
[rubygems/rubygems] Extract alias variables for long name class
https://github.com/rubygems/rubygems/commit/33caea928e
Diffstat (limited to 'test/rubygems/test_gem_resolver_api_set.rb')
-rw-r--r-- | test/rubygems/test_gem_resolver_api_set.rb | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/test/rubygems/test_gem_resolver_api_set.rb b/test/rubygems/test_gem_resolver_api_set.rb index e047717424..b82f00a190 100644 --- a/test/rubygems/test_gem_resolver_api_set.rb +++ b/test/rubygems/test_gem_resolver_api_set.rb @@ -6,12 +6,11 @@ class TestGemResolverAPISet < Gem::TestCase def setup super - @DR = Gem::Resolver @dep_uri = URI "#{@gem_repo}info/" end def test_initialize - set = @DR::APISet.new + set = Gem::Resolver::APISet.new assert_equal URI("https://index.rubygems.org/info/"), set.dep_uri assert_equal URI("https://index.rubygems.org/"), set.uri @@ -19,7 +18,7 @@ class TestGemResolverAPISet < Gem::TestCase end def test_initialize_deeper_uri - set = @DR::APISet.new "https://rubygemsserver.com/mygems/info" + set = Gem::Resolver::APISet.new "https://rubygemsserver.com/mygems/info" assert_equal URI("https://rubygemsserver.com/mygems/info"), set.dep_uri assert_equal URI("https://rubygemsserver.com/"), set.uri @@ -27,7 +26,7 @@ class TestGemResolverAPISet < Gem::TestCase end def test_initialize_uri - set = @DR::APISet.new @dep_uri + set = Gem::Resolver::APISet.new @dep_uri assert_equal URI("#{@gem_repo}info/"), set.dep_uri assert_equal URI(@gem_repo.to_s), set.uri @@ -45,12 +44,12 @@ class TestGemResolverAPISet < Gem::TestCase @fetcher.data["#{@dep_uri}a"] = "---\n1 " - set = @DR::APISet.new @dep_uri + set = Gem::Resolver::APISet.new @dep_uri - a_dep = @DR::DependencyRequest.new dep("a"), nil + a_dep = Gem::Resolver::DependencyRequest.new dep("a"), nil expected = [ - @DR::APISpecification.new(set, data.first), + Gem::Resolver::APISpecification.new(set, data.first), ] assert_equal expected, set.find_all(a_dep) @@ -72,14 +71,14 @@ class TestGemResolverAPISet < Gem::TestCase @fetcher.data["#{@dep_uri}a"] = "---\n1\n2.a" - set = @DR::APISet.new @dep_uri + set = Gem::Resolver::APISet.new @dep_uri set.prerelease = true - a_dep = @DR::DependencyRequest.new dep("a"), nil + a_dep = Gem::Resolver::DependencyRequest.new dep("a"), nil expected = [ - @DR::APISpecification.new(set, data.first), - @DR::APISpecification.new(set, data.last), + Gem::Resolver::APISpecification.new(set, data.first), + Gem::Resolver::APISpecification.new(set, data.last), ] assert_equal expected, set.find_all(a_dep) @@ -97,14 +96,14 @@ class TestGemResolverAPISet < Gem::TestCase @fetcher.data["#{@dep_uri}a"] = "---\n1 " - set = @DR::APISet.new @dep_uri + set = Gem::Resolver::APISet.new @dep_uri - a_dep = @DR::DependencyRequest.new dep("a"), nil + a_dep = Gem::Resolver::DependencyRequest.new dep("a"), nil set.prefetch [a_dep] expected = [ - @DR::APISpecification.new(set, data.first), + Gem::Resolver::APISpecification.new(set, data.first), ] assert_equal expected, set.find_all(a_dep) @@ -113,10 +112,10 @@ class TestGemResolverAPISet < Gem::TestCase end def test_find_all_local - set = @DR::APISet.new @dep_uri + set = Gem::Resolver::APISet.new @dep_uri set.remote = false - a_dep = @DR::DependencyRequest.new dep("a"), nil + a_dep = Gem::Resolver::DependencyRequest.new dep("a"), nil assert_empty set.find_all(a_dep) end @@ -126,9 +125,9 @@ class TestGemResolverAPISet < Gem::TestCase @fetcher.data["#{@dep_uri}a"] = "---" - set = @DR::APISet.new @dep_uri + set = Gem::Resolver::APISet.new @dep_uri - a_dep = @DR::DependencyRequest.new dep("a"), nil + a_dep = Gem::Resolver::DependencyRequest.new dep("a"), nil assert_empty set.find_all(a_dep) @@ -143,10 +142,10 @@ class TestGemResolverAPISet < Gem::TestCase @fetcher.data["#{@dep_uri}a"] = "---\n1 \n" @fetcher.data["#{@dep_uri}b"] = "---" - set = @DR::APISet.new @dep_uri + set = Gem::Resolver::APISet.new @dep_uri - a_dep = @DR::DependencyRequest.new dep("a"), nil - b_dep = @DR::DependencyRequest.new dep("b"), nil + a_dep = Gem::Resolver::DependencyRequest.new dep("a"), nil + b_dep = Gem::Resolver::DependencyRequest.new dep("b"), nil set.prefetch [a_dep, b_dep] @@ -159,10 +158,10 @@ class TestGemResolverAPISet < Gem::TestCase @fetcher.data["#{@dep_uri}a"] = "---\n1 \n" - set = @DR::APISet.new @dep_uri + set = Gem::Resolver::APISet.new @dep_uri - a_dep = @DR::DependencyRequest.new dep("a"), nil - b_dep = @DR::DependencyRequest.new dep("b"), nil + a_dep = Gem::Resolver::DependencyRequest.new dep("a"), nil + b_dep = Gem::Resolver::DependencyRequest.new dep("b"), nil set.prefetch [a_dep] @@ -178,10 +177,10 @@ class TestGemResolverAPISet < Gem::TestCase @fetcher.data["#{@dep_uri}a"] = "---\n1 \n" @fetcher.data["#{@dep_uri}b"] = "---" - set = @DR::APISet.new @dep_uri + set = Gem::Resolver::APISet.new @dep_uri - a_dep = @DR::DependencyRequest.new dep("a"), nil - b_dep = @DR::DependencyRequest.new dep("b"), nil + a_dep = Gem::Resolver::DependencyRequest.new dep("a"), nil + b_dep = Gem::Resolver::DependencyRequest.new dep("b"), nil set.prefetch [a_dep, b_dep] @@ -197,11 +196,11 @@ class TestGemResolverAPISet < Gem::TestCase @fetcher.data["#{@dep_uri}a"] = "---\n1 \n" @fetcher.data["#{@dep_uri}b"] = "---" - set = @DR::APISet.new @dep_uri + set = Gem::Resolver::APISet.new @dep_uri set.remote = false - a_dep = @DR::DependencyRequest.new dep("a"), nil - b_dep = @DR::DependencyRequest.new dep("b"), nil + a_dep = Gem::Resolver::DependencyRequest.new dep("a"), nil + b_dep = Gem::Resolver::DependencyRequest.new dep("b"), nil set.prefetch [a_dep, b_dep] |