Fixed test condition for specified bundled gems

This commit is contained in:
Hiroshi SHIBATA 2024-11-27 16:17:13 +09:00
parent 26aebdb6d6
commit ac7b63e353
Notes: git 2024-11-27 07:45:41 +00:00
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ load File.dirname(__FILE__) + '/default.mspec'
class MSpecScript
test_bundled_gems = get(:stdlibs).to_a & get(:bundled_gems).to_a
unless ENV["BUNDLED_GEMS"].nil?
unless ENV["BUNDLED_GEMS"].nil? || ENV["BUNDLED_GEMS"].empty?
test_bundled_gems = ENV["BUNDLED_GEMS"].split(",").map do |gem|
test_bundled_gems.find{|test_gem| test_gem.include?(gem) }
end.compact

View File

@ -24,7 +24,7 @@ failed = []
File.foreach("#{gem_dir}/bundled_gems") do |line|
next if /^\s*(?:#|$)/ =~ line
gem = line.split.first
next unless bundled_gems.delete_prefix("BUNDLED_GEMS=").split(",").include?(gem)
next unless bundled_gems.empty? || bundled_gems.split(",").include?(gem)
next unless File.directory?("#{gem_dir}/src/#{gem}/test")
test_command = "#{ruby} -C #{gem_dir}/src/#{gem} #{rake} test"