summaryrefslogtreecommitdiff
path: root/test/rubygems
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-04-05 10:45:46 +0900
committergit <svn-admin@ruby-lang.org>2023-04-05 05:49:24 +0000
commitcbeea5f3e6a5b5112ff5973c02c934ed415e2dc7 (patch)
tree4e02b1c7c23681ddcf95edda011bfc5235db2ab6 /test/rubygems
parentbf8afe434f4fcaad4d69a038e7f92786b5a56723 (diff)
downloadruby-cbeea5f3e6a5b5112ff5973c02c934ed415e2dc7.tar.gz
[rubygems/rubygems] Unify java_platform? to Gem.java_platform?
https://github.com/rubygems/rubygems/commit/7f27ab32b8
Diffstat (limited to 'test/rubygems')
-rw-r--r--test/rubygems/helper.rb14
-rw-r--r--test/rubygems/test_gem_commands_build_command.rb6
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder.rb2
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder_unit.rb2
-rw-r--r--test/rubygems/test_gem_ext_ext_conf_builder.rb6
-rw-r--r--test/rubygems/test_gem_util.rb4
-rw-r--r--test/rubygems/test_require.rb2
7 files changed, 11 insertions, 25 deletions
diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb
index afd308efc9..a7f7bafc24 100644
--- a/test/rubygems/helper.rb
+++ b/test/rubygems/helper.rb
@@ -1146,20 +1146,6 @@ Also, a list:
end
##
- # Is this test being run on a Java platform?
-
- def self.java_platform?
- Gem.java_platform?
- end
-
- ##
- # see ::java_platform?
-
- def java_platform?
- self.class.java_platform?
- end
-
- ##
# Returns whether or not we're on a version of Ruby built with VC++ (or
# Borland) versus Cygwin, Mingw, etc.
diff --git a/test/rubygems/test_gem_commands_build_command.rb b/test/rubygems/test_gem_commands_build_command.rb
index 0d0fab8e79..42f09003fc 100644
--- a/test/rubygems/test_gem_commands_build_command.rb
+++ b/test/rubygems/test_gem_commands_build_command.rb
@@ -593,7 +593,7 @@ class TestGemCommandsBuildCommand < Gem::TestCase
end
def test_build_signed_gem
- pend "openssl is missing" unless Gem::HAVE_OPENSSL && !java_platform?
+ pend "openssl is missing" unless Gem::HAVE_OPENSSL && !Gem.java_platform?
trust_dir = Gem::Security.trust_dir
@@ -620,7 +620,7 @@ class TestGemCommandsBuildCommand < Gem::TestCase
end
def test_build_signed_gem_with_cert_expiration_length_days
- pend "openssl is missing" unless Gem::HAVE_OPENSSL && !java_platform?
+ pend "openssl is missing" unless Gem::HAVE_OPENSSL && !Gem.java_platform?
gem_path = File.join Gem.user_home, ".gem"
Dir.mkdir gem_path
@@ -664,7 +664,7 @@ class TestGemCommandsBuildCommand < Gem::TestCase
end
def test_build_auto_resign_cert
- pend "openssl is missing" unless Gem::HAVE_OPENSSL && !java_platform?
+ pend "openssl is missing" unless Gem::HAVE_OPENSSL && !Gem.java_platform?
gem_path = File.join Gem.user_home, ".gem"
Dir.mkdir gem_path
diff --git a/test/rubygems/test_gem_ext_cargo_builder.rb b/test/rubygems/test_gem_ext_cargo_builder.rb
index e07d6a24c2..ed2290463f 100644
--- a/test/rubygems/test_gem_ext_cargo_builder.rb
+++ b/test/rubygems/test_gem_ext_cargo_builder.rb
@@ -140,7 +140,7 @@ class TestGemExtCargoBuilder < Gem::TestCase
private
def skip_unsupported_platforms!
- pend "jruby not supported" if java_platform?
+ pend "jruby not supported" if Gem.java_platform?
pend "truffleruby not supported (yet)" if RUBY_ENGINE == "truffleruby"
system(@rust_envs, "cargo", "-V", out: IO::NULL, err: [:child, :out])
pend "cargo not present" unless $?.success?
diff --git a/test/rubygems/test_gem_ext_cargo_builder_unit.rb b/test/rubygems/test_gem_ext_cargo_builder_unit.rb
index 0ca8306842..89495b84ff 100644
--- a/test/rubygems/test_gem_ext_cargo_builder_unit.rb
+++ b/test/rubygems/test_gem_ext_cargo_builder_unit.rb
@@ -55,6 +55,6 @@ class TestGemExtCargoBuilderUnit < Gem::TestCase
end
def skip_unsupported_platforms!
- pend "jruby not supported" if java_platform?
+ pend "jruby not supported" if Gem.java_platform?
end
end
diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb
index 8e0d188ab6..7ce7c42653 100644
--- a/test/rubygems/test_gem_ext_ext_conf_builder.rb
+++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb
@@ -15,7 +15,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase
end
def test_class_build
- if java_platform?
+ if Gem.java_platform?
pend("failing on jruby")
end
@@ -45,7 +45,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase
end
def test_class_build_rbconfig_make_prog
- if java_platform?
+ if Gem.java_platform?
pend("failing on jruby")
end
@@ -72,7 +72,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase
env_MAKE = ENV.delete "MAKE"
ENV["MAKE"] = "anothermake"
- if java_platform?
+ if Gem.java_platform?
pend("failing on jruby")
end
diff --git a/test/rubygems/test_gem_util.rb b/test/rubygems/test_gem_util.rb
index 5a50c5b8db..348ecaecfe 100644
--- a/test/rubygems/test_gem_util.rb
+++ b/test/rubygems/test_gem_util.rb
@@ -36,7 +36,7 @@ class TestGemUtil < Gem::TestCase
end
def test_traverse_parents_does_not_crash_on_permissions_error
- pend "skipped on MS Windows (chmod has no effect)" if win_platform? || java_platform?
+ pend "skipped on MS Windows (chmod has no effect)" if win_platform? || Gem.java_platform?
FileUtils.mkdir_p "d/e/f"
# remove 'execute' permission from "e" directory and make it
@@ -53,7 +53,7 @@ class TestGemUtil < Gem::TestCase
assert_equal File.realpath("../..", @tempdir), paths[3]
ensure
# restore default permissions, allow the directory to be removed
- FileUtils.chmod(0775, "d/e") unless win_platform? || java_platform?
+ FileUtils.chmod(0775, "d/e") unless win_platform? || Gem.java_platform?
end
def test_glob_files_in_dir
diff --git a/test/rubygems/test_require.rb b/test/rubygems/test_require.rb
index 84b31d6a02..95bae66e21 100644
--- a/test/rubygems/test_require.rb
+++ b/test/rubygems/test_require.rb
@@ -225,7 +225,7 @@ class TestGemRequire < Gem::TestCase
pend "Not sure what's going on. If another spec creates a 'a' gem before
this test, somehow require will load the benchmark in b, and ignore that the
stdlib one is already in $LOADED_FEATURES?. Reproducible by running the
- spaceship_specific_file test before this one" if java_platform?
+ spaceship_specific_file test before this one" if Gem.java_platform?
pend "not installed yet" unless RbConfig::TOPDIR