summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-11-18 23:39:57 +0900
committerKazuhiro NISHIYAMA <znz@users.noreply.github.com>2019-11-19 00:29:10 +0900
commit9aa75795f9f438d5c874d8e418c3c7cdd63024fa (patch)
treeb7c9cca93da75ac0732a8a81f1787fdceec32a12 /spec
parente9992bcab03b1646d18b4a417643273a7bbb6158 (diff)
Skip some tests if extracted from tarball
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2683
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/support/path.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/bundler/support/path.rb b/spec/bundler/support/path.rb
index cc5aebb01b..e778809830 100644
--- a/spec/bundler/support/path.rb
+++ b/spec/bundler/support/path.rb
@@ -30,14 +30,23 @@ module Spec
end
def tracked_files
+ if root != `git rev-parse --show-toplevel`
+ skip 'not in git working directory'
+ end
@tracked_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler man/bundler*` : `git ls-files -z`
end
def shipped_files
+ if root != `git rev-parse --show-toplevel`
+ skip 'not in git working directory'
+ end
@shipped_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb man/bundler* libexec/bundle*` : `git ls-files -z -- lib man exe CHANGELOG.md LICENSE.md README.md bundler.gemspec`
end
def lib_tracked_files
+ if root != `git rev-parse --show-toplevel`
+ skip 'not in git working directory'
+ end
@lib_tracked_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb` : `git ls-files -z -- lib`
end