summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-03-24 04:52:19 +0900
committerGitHub <noreply@github.com>2021-03-24 04:52:19 +0900
commit2efda212b0d9ad5ec265271db25ad51d796fde44 (patch)
treeb2667694205da0fd71dfa8dafc2655f6d464896e /test
parentff2ea4daeb795ebb3d0afa8c57d86a4af9757e50 (diff)
Merge RubyGems-3.2.15 and Bundler-2.2.15 (#4311)
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb29
1 files changed, 28 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb
index 749e9bee20..a06b19c790 100644
--- a/test/rubygems/test_gem_commands_update_command.rb
+++ b/test/rubygems/test_gem_commands_update_command.rb
@@ -168,6 +168,15 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
@cmd.options[:args] = []
@cmd.options[:system] = "2.5.1"
+ oldest_version_mod = Module.new do
+ def oldest_supported_version
+ Gem::Version.new("2.5.2")
+ end
+ private :oldest_supported_version
+ end
+
+ @cmd.extend(oldest_version_mod)
+
assert_raises Gem::MockGemUi::TermError do
use_ui @ui do
@cmd.execute
@@ -175,7 +184,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
end
assert_empty @ui.output
- assert_equal "ERROR: rubygems 2.5.1 is not supported. The oldest supported version is 2.5.2\n", @ui.error
+ assert_equal "ERROR: rubygems 2.5.1 is not supported on #{RUBY_VERSION}. The oldest version supported by this ruby is 2.5.2\n", @ui.error
end
def test_execute_system_specific_older_than_3_2_removes_plugins_dir
@@ -185,6 +194,15 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
end
end
+ oldest_version_mod = Module.new do
+ def oldest_supported_version
+ Gem::Version.new("2.5.2")
+ end
+ private :oldest_supported_version
+ end
+
+ @cmd.extend(oldest_version_mod)
+
@cmd.options[:args] = []
@cmd.options[:system] = "3.1"
@@ -203,6 +221,15 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
end
end
+ oldest_version_mod = Module.new do
+ def oldest_supported_version
+ Gem::Version.new("2.5.2")
+ end
+ private :oldest_supported_version
+ end
+
+ @cmd.extend(oldest_version_mod)
+
@cmd.options[:args] = []
@cmd.options[:system] = "3.2.a"