summaryrefslogtreecommitdiff
path: root/test/rubygems
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems')
-rw-r--r--test/rubygems/test_gem.rb6
-rw-r--r--test/rubygems/test_gem_dependency.rb6
-rw-r--r--test/rubygems/test_gem_dependency_list.rb2
-rw-r--r--test/rubygems/test_gem_gem_path_searcher.rb18
-rw-r--r--test/rubygems/test_gem_platform.rb2
-rw-r--r--test/rubygems/test_gem_server.rb12
-rw-r--r--test/rubygems/test_gem_source_index.rb28
-rw-r--r--test/rubygems/test_gem_specification.rb8
8 files changed, 41 insertions, 41 deletions
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index bbb61bfa49..436d14c927 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -435,7 +435,7 @@ class TestGem < Gem::TestCase
def test_self_available?
util_make_gems
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert(Gem.available?("a"))
assert(Gem.available?("a", "1"))
assert(Gem.available?("a", ">1"))
@@ -937,7 +937,7 @@ class TestGem < Gem::TestCase
end
def test_self_source_index
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert_kind_of Gem::SourceIndex, Gem.source_index
end
end
@@ -1093,7 +1093,7 @@ class TestGem < Gem::TestCase
# @abin_path = File.join spec.full_gem_path, spec.bindir, 'abin'
# FileUtils.mkdir_p File.join(stem, "gems", "test-3")
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
expected = [File.join(@gemhome, "gems", "a-4", "lib")]
assert_equal expected, Gem.latest_load_paths
end
diff --git a/test/rubygems/test_gem_dependency.rb b/test/rubygems/test_gem_dependency.rb
index a79287414e..e1ba5ffbe7 100644
--- a/test/rubygems/test_gem_dependency.rb
+++ b/test/rubygems/test_gem_dependency.rb
@@ -63,7 +63,7 @@ class TestGemDependency < Gem::TestCase
assert_match dep("a", ">= 0"), dep("a", "1"), "match version"
refute_match dep("a"), Object.new
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert_match dep(/a/, ">= 0"), d, "match simple regexp"
assert_match dep(/a|b/, ">= 0"), d, "match scary regexp"
refute_match dep(/a/), dep("b")
@@ -72,7 +72,7 @@ class TestGemDependency < Gem::TestCase
def test_equals_tilde_escape
refute_match dep("a|b"), dep("a", "1")
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert_match dep(/a|b/), dep("a", "1")
end
end
@@ -88,7 +88,7 @@ class TestGemDependency < Gem::TestCase
def test_equals_tilde_spec
assert_match dep("a", ">= 0"), spec("a", "0")
assert_match dep("a", "1"), spec("a", "1")
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert_match dep(/a/, ">= 0"), spec("a", "0")
assert_match dep(/a|b/, ">= 0"), spec("b", "0")
refute_match dep(/a/, ">= 0"), spec("b", "0")
diff --git a/test/rubygems/test_gem_dependency_list.rb b/test/rubygems/test_gem_dependency_list.rb
index 8b920a8f9f..b6d1b2f754 100644
--- a/test/rubygems/test_gem_dependency_list.rb
+++ b/test/rubygems/test_gem_dependency_list.rb
@@ -28,7 +28,7 @@ class TestGemDependencyList < Gem::TestCase
util_clear_gems
install_specs @a1, @b2
- deps = Deprecate.skip_during { Gem::DependencyList.from_source_index }
+ deps = Gem::Deprecate.skip_during { Gem::DependencyList.from_source_index }
assert_equal %w[b-2 a-1], deps.dependency_order.map { |s| s.full_name }
end
diff --git a/test/rubygems/test_gem_gem_path_searcher.rb b/test/rubygems/test_gem_gem_path_searcher.rb
index cb2afcdd26..dfabc0b885 100644
--- a/test/rubygems/test_gem_gem_path_searcher.rb
+++ b/test/rubygems/test_gem_gem_path_searcher.rb
@@ -29,23 +29,23 @@ class TestGemGemPathSearcher < Gem::TestCase
@fetcher = Gem::FakeFetcher.new
Gem::RemoteFetcher.fetcher = @fetcher
- @gps = Deprecate.skip_during { Gem::GemPathSearcher.new }
+ @gps = Gem::Deprecate.skip_during { Gem::GemPathSearcher.new }
end
def test_find
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert_equal @foo1, @gps.find('foo')
end
end
def test_find_all
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert_equal [@foo1], @gps.find_all('foo')
end
end
def test_init_gemspecs
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
util_clear_gems
util_setup_spec_fetcher @foo1, @foo2, @bar1, @bar2
expected = [@bar2, @bar1, @foo2, @foo1].map(&:full_name)
@@ -55,7 +55,7 @@ class TestGemGemPathSearcher < Gem::TestCase
end
def test_lib_dirs_for
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
lib_dirs = @gps.lib_dirs_for(@foo1)
expected = File.join @gemhome, 'gems', @foo1.full_name, '{lib,lib2}'
@@ -64,20 +64,20 @@ class TestGemGemPathSearcher < Gem::TestCase
end
def test_lib_dirs_for_nil_require_paths
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert_nil @gps.lib_dirs_for(@nrp)
end
end
def test_matching_file_eh
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
refute @gps.matching_file?(@foo1, 'bar')
assert @gps.matching_file?(@foo1, 'foo')
end
end
def test_matching_files
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert_equal [], @gps.matching_files(@foo1, 'bar')
expected = File.join @foo1.full_gem_path, 'lib', 'foo.rb'
@@ -87,7 +87,7 @@ class TestGemGemPathSearcher < Gem::TestCase
end
def test_matching_files_nil_require_paths
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert_empty @gps.matching_files(@nrp, 'foo')
end
end
diff --git a/test/rubygems/test_gem_platform.rb b/test/rubygems/test_gem_platform.rb
index 4cb2f067c1..bd09b89f0a 100644
--- a/test/rubygems/test_gem_platform.rb
+++ b/test/rubygems/test_gem_platform.rb
@@ -138,7 +138,7 @@ class TestGemPlatform < Gem::TestCase
def test_empty
platform = Gem::Platform.new 'cpu-other_platform1'
assert_respond_to platform, :empty?
- assert_equal false, Deprecate.skip_during { platform.empty? }
+ assert_equal false, Gem::Deprecate.skip_during { platform.empty? }
end
def test_to_s
diff --git a/test/rubygems/test_gem_server.rb b/test/rubygems/test_gem_server.rb
index 82b3a5c948..f11840db06 100644
--- a/test/rubygems/test_gem_server.rb
+++ b/test/rubygems/test_gem_server.rb
@@ -33,7 +33,7 @@ class TestGemServer < Gem::TestCase
data = StringIO.new "GET /Marshal.#{Gem.marshal_version} HTTP/1.0\r\n\r\n"
@req.parse data
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
@server.Marshal @req, @res
end
@@ -41,7 +41,7 @@ class TestGemServer < Gem::TestCase
assert_match %r| \d\d:\d\d:\d\d |, @res['date']
assert_equal 'application/octet-stream', @res['content-type']
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
si = Gem::SourceIndex.new
si.add_specs @a1, @a2
@@ -53,7 +53,7 @@ class TestGemServer < Gem::TestCase
data = StringIO.new "GET /Marshal.#{Gem.marshal_version}.Z HTTP/1.0\r\n\r\n"
@req.parse data
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
@server.Marshal @req, @res
end
@@ -61,7 +61,7 @@ class TestGemServer < Gem::TestCase
assert_match %r| \d\d:\d\d:\d\d |, @res['date']
assert_equal 'application/x-deflate', @res['content-type']
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
si = Gem::SourceIndex.new
si.add_specs @a1, @a2
@@ -73,7 +73,7 @@ class TestGemServer < Gem::TestCase
data = StringIO.new "GET /latest_specs.#{Gem.marshal_version} HTTP/1.0\r\n\r\n"
@req.parse data
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
@server.latest_specs @req, @res
end
@@ -88,7 +88,7 @@ class TestGemServer < Gem::TestCase
data = StringIO.new "GET /latest_specs.#{Gem.marshal_version}.gz HTTP/1.0\r\n\r\n"
@req.parse data
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
@server.latest_specs @req, @res
end
diff --git a/test/rubygems/test_gem_source_index.rb b/test/rubygems/test_gem_source_index.rb
index 8d0885c860..b4c225ec6c 100644
--- a/test/rubygems/test_gem_source_index.rb
+++ b/test/rubygems/test_gem_source_index.rb
@@ -9,11 +9,11 @@ class TestGemSourceIndex < Gem::TestCase
util_setup_fake_fetcher
- @source_index = Deprecate.skip_during { Gem.source_index }
+ @source_index = Gem::Deprecate.skip_during { Gem.source_index }
end
def test_find_name
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert_equal [@a1, @a2, @a3a], @source_index.find_name('a')
assert_equal [@a2], @source_index.find_name('a', '= 2')
assert_equal [], @source_index.find_name('bogusstring')
@@ -31,7 +31,7 @@ class TestGemSourceIndex < Gem::TestCase
end
def test_find_name_empty_cache
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
empty_source_index = Gem::SourceIndex.new
assert_equal [], empty_source_index.find_name("foo")
end
@@ -39,7 +39,7 @@ class TestGemSourceIndex < Gem::TestCase
# HACK: deprecated impl is failing tests, but I may want to port it over
def test_latest_specs
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
p1_ruby = quick_spec 'p', '1'
p1_platform = quick_spec 'p', '1' do |spec|
spec.platform = Gem::Platform::CURRENT
@@ -87,7 +87,7 @@ class TestGemSourceIndex < Gem::TestCase
end
def test_load_gems_in
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
spec_dir1 = File.join @gemhome, 'specifications'
spec_dir2 = File.join @tempdir, 'gemhome2', 'specifications'
@@ -118,7 +118,7 @@ class TestGemSourceIndex < Gem::TestCase
# REFACTOR: move to test_gem_commands_outdated_command.rb
def test_outdated
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
util_setup_spec_fetcher
assert_equal [], @source_index.outdated
@@ -139,7 +139,7 @@ class TestGemSourceIndex < Gem::TestCase
end
def test_prerelease_specs_kept_in_right_place
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
gem_a1_alpha = quick_spec 'abba', '1.a'
@source_index.add_spec gem_a1_alpha
@@ -151,7 +151,7 @@ class TestGemSourceIndex < Gem::TestCase
end
def test_refresh_bang
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
a1_spec = File.join @gemhome, "specifications", @a1.spec_name
FileUtils.mv a1_spec, @tempdir
@@ -171,7 +171,7 @@ class TestGemSourceIndex < Gem::TestCase
end
def test_remove_spec
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
si = Gem.source_index
expected = si.gems.keys.sort
@@ -189,7 +189,7 @@ class TestGemSourceIndex < Gem::TestCase
end
def test_search
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
requirement = Gem::Requirement.create '= 9'
with_version = Gem::Dependency.new(/^a/, requirement)
assert_equal [@a_evil9], @source_index.search(with_version)
@@ -203,7 +203,7 @@ class TestGemSourceIndex < Gem::TestCase
end
def test_search_platform
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
util_set_arch 'x86-my_platform1'
a1 = quick_spec 'a', '1'
@@ -226,7 +226,7 @@ class TestGemSourceIndex < Gem::TestCase
end
def test_signature
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
sig = @source_index.gem_signature('foo-1.2.3')
assert_equal 64, sig.length
assert_match(/^[a-f0-9]{64}$/, sig)
@@ -234,7 +234,7 @@ class TestGemSourceIndex < Gem::TestCase
end
def test_specification
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert_equal @a1, @source_index.specification(@a1.full_name)
assert_nil @source_index.specification("foo-1.2.4")
@@ -242,7 +242,7 @@ class TestGemSourceIndex < Gem::TestCase
end
def test_index_signature
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
sig = @source_index.index_signature
assert_match(/^[a-f0-9]{64}$/, sig)
end
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 717710b940..a5d5baaa8e 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -222,7 +222,7 @@ bindir:
end
def test_self_load_legacy_ruby
- spec = Deprecate.skip_during do
+ spec = Gem::Deprecate.skip_during do
eval LEGACY_RUBY_SPEC
end
assert_equal 'keyedlist', spec.name
@@ -404,7 +404,7 @@ bindir:
assert @a2.activated?
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert @a2.loaded?
end
end
@@ -677,7 +677,7 @@ bindir:
end
def test_installation_path
- Deprecate.skip_during do
+ Gem::Deprecate.skip_during do
assert_equal @gemhome, @a1.installation_path
@a1.instance_variable_set :@loaded_from, nil
@@ -977,7 +977,7 @@ end
end
def test_to_ruby_legacy
- gemspec1 = Deprecate.skip_during do
+ gemspec1 = Gem::Deprecate.skip_during do
eval LEGACY_RUBY_SPEC
end
ruby_code = gemspec1.to_ruby