summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Lance <stefan@lances.net>2015-07-09 14:51:08 -0500
committerStefan Lance <stefan@lances.net>2015-07-09 14:51:08 -0500
commitb1c1c9dd64a0481fa22fb3f876cf3f0d36492fd4 (patch)
tree410c710e5cd47db370c4513bfe1b2034e7b491d6
parent7243829baa7f3238543eaacfa2756e69dbc49ae5 (diff)
downloadbundler-default-install-path-2-0.tar.gz
Fix sudo specs that fail remotelydefault-install-path-2-0
-rw-r--r--spec/install/gems/sudo_spec.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/install/gems/sudo_spec.rb b/spec/install/gems/sudo_spec.rb
index 59612e017d..f0e8435edc 100644
--- a/spec/install/gems/sudo_spec.rb
+++ b/spec/install/gems/sudo_spec.rb
@@ -53,7 +53,6 @@ describe "when using sudo", :sudo => true do
it "installs when BUNDLE_PATH is owned by root" do
bundle_path = tmp("owned_by_root")
FileUtils.mkdir_p bundle_path
- sudo "chown -R root #{bundle_path}"
ENV['BUNDLE_PATH'] = bundle_path.to_s
install_gemfile <<-G
@@ -61,8 +60,10 @@ describe "when using sudo", :sudo => true do
gem "rack", '1.0'
G
- expect(bundle_path.join("gems/rack-1.0.0")).to exist
- expect(bundle_path.join("gems/rack-1.0.0").stat.uid).to eq(0)
+ sudo "chown -R root #{bundle_path}"
+
+ expect(bundle_path.join("#{Bundler.ruby_scope}/gems/rack-1.0.0")).to exist
+ expect(bundle_path.join("#{Bundler.ruby_scope}/gems/rack-1.0.0").stat.uid).to eq(0)
should_be_installed "rack 1.0"
end
@@ -77,9 +78,10 @@ describe "when using sudo", :sudo => true do
source "file://#{gem_repo1}"
gem "rack", '1.0'
G
+ sudo "chown -R root #{bundle_path}"
- expect(bundle_path.join("gems/rack-1.0.0")).to exist
- expect(bundle_path.join("gems/rack-1.0.0").stat.uid).to eq(0)
+ expect(bundle_path.join("#{Bundler.ruby_scope}/gems/rack-1.0.0")).to exist
+ expect(bundle_path.join("#{Bundler.ruby_scope}/gems/rack-1.0.0").stat.uid).to eq(0)
should_be_installed "rack 1.0"
end