summaryrefslogtreecommitdiff
path: root/spec/support/path.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/path.rb')
-rw-r--r--spec/support/path.rb24
1 files changed, 15 insertions, 9 deletions
diff --git a/spec/support/path.rb b/spec/support/path.rb
index 0c80fe5551..25206c9832 100644
--- a/spec/support/path.rb
+++ b/spec/support/path.rb
@@ -48,7 +48,13 @@ module Spec
def lib_tracked_files
skip "not in git working directory" unless git_root_dir?
- @lib_tracked_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb` : `git ls-files -z -- lib`
+ @lib_tracked_files ||= ruby_core? ? sys_exec("git ls-files -z -- lib/bundler lib/bundler.rb", :dir => root) : sys_exec("git ls-files -z -- lib", :dir => root)
+ end
+
+ def man_tracked_files
+ skip "not in git working directory" unless git_root_dir?
+
+ @man_tracked_files ||= sys_exec("git ls-files -z -- man", :dir => root)
end
def tmp(*path)
@@ -96,6 +102,14 @@ module Spec
bundled_app("vendor/cache/#{path}.gem")
end
+ def bundled_app_gemfile
+ bundled_app("Gemfile")
+ end
+
+ def bundled_app_lock
+ bundled_app("Gemfile.lock")
+ end
+
def base_system_gems
tmp.join("gems/base")
end
@@ -180,14 +194,6 @@ module Spec
end
end
- def in_app_root
- Dir.chdir(bundled_app) { yield }
- end
-
- def in_app_root2
- Dir.chdir(bundled_app2) { yield }
- end
-
def in_repo_root
Dir.chdir(root) { yield }
end