path: root/test
diff options
authorKazuhiro NISHIYAMA <>2019-11-23 01:29:53 +0900
committerKazuhiro NISHIYAMA <>2019-11-23 01:57:19 +0900
commitd7f100226d41df364b048c7956b5140922970e9a (patch)
treebca79dfb66f431fd4554974ee896e4dd566d036d /test
parent053f78e13988e9253d1f207bf5e23d9505112b32 (diff)
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.
Diffstat (limited to 'test')
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_default_gems.rb b/test/ruby/test_default_gems.rb
index f29b17fd5b..3c4aea1561 100644
--- a/test/ruby/test_default_gems.rb
+++ b/test/ruby/test_default_gems.rb
@@ -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