Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Update sudo specs
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Jul 29, 2018
1 parent 3dabfcb commit 9b38bcb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/install/bundler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@

it "can install dependencies with newer bundler version with a local path", :ruby => "> 2" do
bundle! "config path .bundle"
bundle! "config global_path_appends_ruby_scope true"
install_gemfile! <<-G
source "file://#{gem_repo2}"
gem "rails", "3.0"
Expand Down
4 changes: 4 additions & 0 deletions spec/install/gems/sudo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
end

it "installs when BUNDLE_PATH is owned by root" do
bundle! "config global_path_appends_ruby_scope false" # consistency in tests between 1.x and 2.x modes

bundle_path = tmp("owned_by_root")
FileUtils.mkdir_p bundle_path
sudo "chown -R root #{bundle_path}"
Expand All @@ -68,6 +70,8 @@
end

it "installs when BUNDLE_PATH does not exist" do
bundle! "config global_path_appends_ruby_scope false" # consistency in tests between 1.x and 2.x modes

root_path = tmp("owned_by_root")
FileUtils.mkdir_p root_path
sudo "chown -R root #{root_path}"
Expand Down

0 comments on commit 9b38bcb

Please sign in to comment.