summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-26 13:56:51 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-26 16:20:04 +0200
commit196f3f8b841f410c1e92f5ad56575f0ec0899393 (patch)
treed6d6deac9a88967d6fc49ec458d7ae234177c378
parentdf18afa009bd5a18a52d4abca08af60419e24bed (diff)
downloadbundler-colby/random-test-order.tar.gz
Maybe this will fix itcolby/random-test-order
-rw-r--r--spec/install/gems/sudo_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/install/gems/sudo_spec.rb b/spec/install/gems/sudo_spec.rb
index 1c28c1ccca..5815180d78 100644
--- a/spec/install/gems/sudo_spec.rb
+++ b/spec/install/gems/sudo_spec.rb
@@ -3,13 +3,20 @@
RSpec.describe "when using sudo", :sudo => true do
describe "and BUNDLE_PATH is writable" do
context "but BUNDLE_PATH/build_info is not writable" do
+ let(:subdir) do
+ system_gem_path("cache")
+ end
+
before do
bundle! "config set path.system true"
- subdir = system_gem_path("cache")
subdir.mkpath
sudo "chmod u-w #{subdir}"
end
+ after do
+ sudo "chmod u+w #{subdir}"
+ end
+
it "installs" do
install_gemfile <<-G
source "file://#{gem_repo1}"
@@ -105,6 +112,10 @@ RSpec.describe "when using sudo", :sudo => true do
sudo "chmod ugo-w #{default_bundle_path}"
end
+ after do
+ sudo "chmod ugo+w #{default_bundle_path}"
+ end
+
it "installs" do
install_gemfile <<-G
source "file://#{gem_repo1}"