ruby-changes:58884
From: Kazuhiro <ko1@a...>
Date: Sat, 23 Nov 2019 01:58:11 +0900 (JST)
Subject: [ruby-changes:58884] d7f100226d (master): Skip test_validate_gemspec when tarball and git installed too
https://git.ruby-lang.org/ruby.git/commit/?id=d7f100226d From d7f100226d41df364b048c7956b5140922970e9a Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Sat, 23 Nov 2019 01:29:53 +0900 Subject: Skip test_validate_gemspec when tarball and git installed too `git --version` failed as expected when git is not installed, but unexpectedly pass when git installed and pwd is not in git working directory. So use `git rev-parse` instead, and it failed when git installed too. diff --git a/test/ruby/test_default_gems.rb b/test/ruby/test_default_gems.rb index f29b17f..3c4aea1 100644 --- a/test/ruby/test_default_gems.rb +++ b/test/ruby/test_default_gems.rb @@ -4,7 +4,7 @@ require 'rubygems' https://github.com/ruby/ruby/blob/trunk/test/ruby/test_default_gems.rb#L4 class TestDefaultGems < Test::Unit::TestCase def test_validate_gemspec - skip "git not found" unless system("git", "--version", %i[out err]=>IO::NULL) + skip "git not found" unless system("git", "rev-parse", %i[out err]=>IO::NULL) srcdir = File.expand_path('../../..', __FILE__) Dir.glob("#{srcdir}/{lib,ext}/**/*.gemspec").map do |src| assert_nothing_raised do -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/