summaryrefslogtreecommitdiff
path: root/test/rubygems
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-07-13 12:56:36 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-07-13 14:11:55 +0900
commit437a5ae9d6d60bd1972641167a98204007bd1c0b (patch)
tree79b9ea49442fe896dbd8ef59a8622ea010fb3fb7 /test/rubygems
parente3a988a29c2cfa4a7e2e045d82989a7342955be8 (diff)
Merge RubyGems and Bundler master
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6124
Diffstat (limited to 'test/rubygems')
-rw-r--r--test/rubygems/test_gem_commands_pristine_command.rb1
-rw-r--r--test/rubygems/test_gem_platform.rb16
-rw-r--r--test/rubygems/test_gem_specification.rb2
3 files changed, 19 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_pristine_command.rb b/test/rubygems/test_gem_commands_pristine_command.rb
index f4000f4657..0ee67be391 100644
--- a/test/rubygems/test_gem_commands_pristine_command.rb
+++ b/test/rubygems/test_gem_commands_pristine_command.rb
@@ -412,6 +412,7 @@ class TestGemCommandsPristineCommand < Gem::TestCase
install_gem specs["b-1"]
FileUtils.rm File.join(gemhome2, 'cache', 'b-1.gem')
+ Gem::Specification.reset
@cmd.options[:args] = %w[a b]
diff --git a/test/rubygems/test_gem_platform.rb b/test/rubygems/test_gem_platform.rb
index 8029035db1..b9202ab7be 100644
--- a/test/rubygems/test_gem_platform.rb
+++ b/test/rubygems/test_gem_platform.rb
@@ -280,6 +280,22 @@ class TestGemPlatform < Gem::TestCase
refute((Gem::Platform.local === arm), 'armv7 === arm')
end
+ def test_equals3_universal_mingw
+ uni_mingw = Gem::Platform.new 'universal-mingw'
+ mingw32 = Gem::Platform.new 'x64-mingw32'
+ mingw_ucrt = Gem::Platform.new 'x64-mingw-ucrt'
+
+ util_set_arch 'x64-mingw32'
+ assert((uni_mingw === Gem::Platform.local), 'uni_mingw === mingw32')
+ assert((mingw32 === Gem::Platform.local), 'mingw32 === mingw32')
+ refute((mingw_ucrt === Gem::Platform.local), 'mingw32 === mingw_ucrt')
+
+ util_set_arch 'x64-mingw-ucrt'
+ assert((uni_mingw === Gem::Platform.local), 'uni_mingw === mingw32')
+ assert((mingw_ucrt === Gem::Platform.local), 'mingw_ucrt === mingw_ucrt')
+ refute((mingw32 === Gem::Platform.local), 'mingw32 === mingw_ucrt')
+ end
+
def test_equals3_version
util_set_arch 'i686-darwin8'
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 928fd571ed..693e6e97c5 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -3676,6 +3676,8 @@ end
install_specs b
+ Gem::Specification.reset
+
assert Gem::Specification.find_by_name "b"
assert_raise Gem::MissingSpecVersionError do