mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Fix some sudo specs to do the right thing on bundler 3
On bundler 3, where the default install path is `.bundle`, these specs
were trying to change permissions of the
`.bundle/ruby/<ruby_abi_version>` folder, which didn't exist yet,so the
permission changing command was failing and the spec was not testing the
right thing.
Change the specs so that the permissions are correctly changed, by first
configuring the local path to be `.bundle` (which creates the `.bundle`
folder), and then changing permissions of the `.bundle` folder
explicitly, which exists already.
2833162fb0
This commit is contained in:
parent
5454415750
commit
974c40c842
Notes:
git
2020-06-18 19:15:19 +09:00
1 changed files with 4 additions and 3 deletions
|
@ -105,11 +105,12 @@ RSpec.describe "when using sudo", :sudo => true do
|
||||||
|
|
||||||
describe "and BUNDLE_PATH is not writable" do
|
describe "and BUNDLE_PATH is not writable" do
|
||||||
before do
|
before do
|
||||||
sudo "chmod ugo-w #{default_bundle_path}"
|
bundle "config set --local path .bundle"
|
||||||
|
sudo "chmod ugo-w .bundle"
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
after do
|
||||||
sudo "chmod ugo+w #{default_bundle_path}"
|
sudo "chmod ugo+w .bundle"
|
||||||
end
|
end
|
||||||
|
|
||||||
it "installs" do
|
it "installs" do
|
||||||
|
@ -118,7 +119,7 @@ RSpec.describe "when using sudo", :sudo => true do
|
||||||
gem "rack", '1.0'
|
gem "rack", '1.0'
|
||||||
G
|
G
|
||||||
|
|
||||||
expect(default_bundle_path("gems/rack-1.0.0")).to exist
|
expect(local_gem_path("gems/rack-1.0.0")).to exist
|
||||||
expect(the_bundle).to include_gems "rack 1.0"
|
expect(the_bundle).to include_gems "rack 1.0"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue