summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVít Ondruch <vondruch@redhat.com>2019-07-22 14:31:10 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-07-31 07:47:02 +0800
commita3b784b3a068ddd9a395b8951e9977035eca5066 (patch)
tree1f88477341eacd8c4b00ae4704441511cc79d2d2 /test
parentd1806bd8da963c597ccd8c0b63ceac4dbe3ff3ae (diff)
[rubygems/rubygems] Move default specifications dir definition out of BasicSpecification.
This was never the right place. The method got there just by evolution, not by design. Move it within default methods, where it suits better. Since this method is presumably used just internally, it should be safe to deprecate it and remove later. https://github.com/rubygems/rubygems/commit/0c0dd9458a
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb6
-rw-r--r--test/rubygems/test_gem_specification.rb6
2 files changed, 6 insertions, 6 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 0345386804..ad29b1bde5 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -67,7 +67,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
io.puts gemspec.to_ruby
end
- open(File.join(Gem::Specification.default_specifications_dir, "bundler-1.15.4.gemspec"), 'w') do |io|
+ open(File.join(Gem.default_specifications_dir, "bundler-1.15.4.gemspec"), 'w') do |io|
gemspec.version = "1.15.4"
io.puts gemspec.to_ruby
end
@@ -181,7 +181,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
@cmd.install_default_bundler_gem bin_dir
bundler_spec = Gem::Specification.load("bundler/bundler.gemspec")
- default_spec_path = File.join(Gem::Specification.default_specifications_dir, "#{bundler_spec.full_name}.gemspec")
+ default_spec_path = File.join(Gem.default_specifications_dir, "#{bundler_spec.full_name}.gemspec")
spec = Gem::Specification.load(default_spec_path)
spec.executables.each do |e|
@@ -192,7 +192,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
assert_path_exists File.join bin_dir, Gem.default_exec_format % e
end
- default_dir = Gem::Specification.default_specifications_dir
+ default_dir = Gem.default_specifications_dir
# expect to remove other versions of bundler gemspecs on default specification directory.
refute_path_exists File.join(default_dir, "bundler-1.15.4.gemspec")
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index ffb6ca2ad4..4c68545c3b 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -1126,7 +1126,7 @@ dependencies: []
Gem::Specification.class_variable_set(:@@stubs, nil)
dir_standard_specs = File.join Gem.dir, 'specifications'
- dir_default_specs = Gem::BasicSpecification.default_specifications_dir
+ dir_default_specs = Gem.default_specifications_dir
# Create gemspecs in three locations used in stubs
loaded_spec = Gem::Specification.new 'a', '3'
@@ -1146,7 +1146,7 @@ dependencies: []
Gem::Specification.class_variable_set(:@@stubs, nil)
dir_standard_specs = File.join Gem.dir, 'specifications'
- dir_default_specs = Gem::BasicSpecification.default_specifications_dir
+ dir_default_specs = Gem.default_specifications_dir
# Create gemspecs in three locations used in stubs
loaded_spec = Gem::Specification.new 'a', '3'
@@ -2049,7 +2049,7 @@ dependencies: []
def test_base_dir_default
default_dir =
- File.join Gem::Specification.default_specifications_dir, @a1.spec_name
+ File.join Gem.default_specifications_dir, @a1.spec_name
@a1.instance_variable_set :@loaded_from, default_dir