Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore default_path test cases for Ruby with custom configuration #7187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions test/rubygems/test_gem.rb
Expand Up @@ -574,6 +574,8 @@ def test_self_default_exec_format_jruby
end

def test_default_path
original_gem_default_path?

vendordir(File.join(@tempdir, "vendor")) do
FileUtils.rm_rf Gem.user_home

Expand All @@ -584,6 +586,8 @@ def test_default_path
end

def test_default_path_missing_vendor
original_gem_default_path?

vendordir(nil) do
FileUtils.rm_rf Gem.user_home

Expand All @@ -594,6 +598,8 @@ def test_default_path_missing_vendor
end

def test_default_path_user_home
original_gem_default_path?

vendordir(File.join(@tempdir, "vendor")) do
expected = [Gem.user_dir, Gem.default_dir]

Expand All @@ -602,6 +608,8 @@ def test_default_path_user_home
end

def test_default_path_vendor_dir
original_gem_default_path?

vendordir(File.join(@tempdir, "vendor")) do
FileUtils.mkdir_p Gem.vendor_dir

Expand Down Expand Up @@ -1796,4 +1804,10 @@ def util_remove_interrupt_command
def util_cache_dir
File.join Gem.dir, "cache"
end

def original_gem_default_path?
unless Gem.method(:default_path).source_location.first.match? "lib/rubygems/defaults.rb"
pend "Gem.default_path likely differs from original RubyGems implementation"
end
end
end