Skip to content

Commit 9aa7579

Browse files
committed
Skip some tests if extracted from tarball
1 parent e9992bc commit 9aa7579

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spec/bundler/support/path.rb

+9
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,23 @@ def spec_dir
3030
end
3131

3232
def tracked_files
33+
if root != `git rev-parse --show-toplevel`
34+
skip 'not in git working directory'
35+
end
3336
@tracked_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler man/bundler*` : `git ls-files -z`
3437
end
3538

3639
def shipped_files
40+
if root != `git rev-parse --show-toplevel`
41+
skip 'not in git working directory'
42+
end
3743
@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`
3844
end
3945

4046
def lib_tracked_files
47+
if root != `git rev-parse --show-toplevel`
48+
skip 'not in git working directory'
49+
end
4150
@lib_tracked_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb` : `git ls-files -z -- lib`
4251
end
4352

0 commit comments

Comments
 (0)