Skip to content

Commit

Permalink
[rubygems/rubygems] Removed test for
Browse files Browse the repository at this point in the history
rubygems/rubygems#6444, I have no idea to
migrate this test to bundler example
yet

rubygems/rubygems@0d869019bf
  • Loading branch information
hsbt authored and matzbot committed Mar 15, 2023
1 parent 55a0fbf commit 31137dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
4 changes: 2 additions & 2 deletions lib/bundler/rubygems_ext.rb
Expand Up @@ -83,8 +83,8 @@ def missing_extensions?
# so we find them with heuristic way. We should improve it.
if source.respond_to?(:root)
return false if (full_require_paths - [extension_dir]).any? do |path|
File.exist?(File.join(path, "#{name}.#{RbConfig::CONFIG['DLEXT']}")) ||
!Dir.glob(File.join(path, name, "*.#{RbConfig::CONFIG['DLEXT']}")).empty?
File.exist?(File.join(path, "#{name}.#{RbConfig::CONFIG["DLEXT"]}")) ||
!Dir.glob(File.join(path, name, "*.#{RbConfig::CONFIG["DLEXT"]}")).empty?
end
end

Expand Down
25 changes: 0 additions & 25 deletions test/rubygems/test_gem_specification.rb
Expand Up @@ -3663,31 +3663,6 @@ def test_missing_extensions_eh_none
refute @a1.missing_extensions?
end

def test_missing_extensions_eh_local_gemspec
pend "extensions don't quite work on jruby" if Gem.java_platform?

spec = new_default_spec "default", 1
spec.extensions << "extconf.rb"

ext_spec
@ext.name = spec.name
FileUtils.mkdir_p File.join(@ext.gem_dir, "lib")

# ext_spec used empty extconf.rb, so we need to create dummy extension for rake-compiler case.
# Ex. lib/gemname.so
FileUtils.touch File.join(@ext.gem_dir, "lib", "#{@ext.name}.#{RbConfig::CONFIG['DLEXT']}")

refute @ext.missing_extensions?

# Try to another case of extconf.rb
# Ex. lib/gemname/parser.so
FileUtils.rm File.join(@ext.gem_dir, "lib", "#{@ext.name}.#{RbConfig::CONFIG['DLEXT']}")
FileUtils.mkdir_p File.join(@ext.gem_dir, "lib", @ext.name)
FileUtils.touch File.join(@ext.gem_dir, "lib", @ext.name, "parser.#{RbConfig::CONFIG['DLEXT']}")

refute @ext.missing_extensions?
end

def test_find_all_by_full_name
pl = Gem::Platform.new "i386-linux"

Expand Down

0 comments on commit 31137dc

Please sign in to comment.