Skip to content

Commit

Permalink
[rubygems/rubygems] Added another case of extconf.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt authored and matzbot committed Mar 11, 2023
1 parent 9801ad4 commit f7b215a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/rubygems/test_gem_specification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3674,9 +3674,18 @@ def test_missing_extensions_eh_local_gemspec
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
Expand Down

0 comments on commit f7b215a

Please sign in to comment.