1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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.
This commit is contained in:
Kazuhiro NISHIYAMA 2019-11-23 01:29:53 +09:00
parent 053f78e139
commit d7f100226d
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -4,7 +4,7 @@ require 'rubygems'
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