summaryrefslogtreecommitdiff
path: root/spec/bundler/install
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-18 12:13:33 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-18 13:33:18 +0900
commit0e40cc9b194a5e46024d32b85a61e651372a65cb (patch)
treed91f781ca34d78897d8cea9fb3403e47f891df5a /spec/bundler/install
parent34f06062174882a98ebef998c50ad8d4f7fc0f2e (diff)
Merge RubyGems 3.2.2 and Bundler 2.2.2
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3930
Diffstat (limited to 'spec/bundler/install')
-rw-r--r--spec/bundler/install/gemfile/groups_spec.rb20
1 files changed, 18 insertions, 2 deletions
diff --git a/spec/bundler/install/gemfile/groups_spec.rb b/spec/bundler/install/gemfile/groups_spec.rb
index 4e7484ddbd..567a9b1172 100644
--- a/spec/bundler/install/gemfile/groups_spec.rb
+++ b/spec/bundler/install/gemfile/groups_spec.rb
@@ -91,8 +91,17 @@ RSpec.describe "bundle install with groups" do
expect(the_bundle).to include_gems "rack 1.0.0", :groups => [:default]
end
- it "respects global `without` configuration, but does not save it locally" do
- bundle "config without emo"
+ it "respects global `without` configuration, and saves it locally", :bundler => "< 3" do
+ bundle "config set without emo"
+ bundle :install
+ expect(the_bundle).to include_gems "rack 1.0.0", :groups => [:default]
+ bundle "config list"
+ expect(out).to include("Set for your local app (#{bundled_app(".bundle/config")}): [:emo]")
+ expect(out).to include("Set for the current user (#{home(".bundle/config")}): [:emo]")
+ end
+
+ it "respects global `without` configuration, but does not save it locally", :bundler => "3" do
+ bundle "config set without emo"
bundle :install
expect(the_bundle).to include_gems "rack 1.0.0", :groups => [:default]
bundle "config list"
@@ -100,6 +109,13 @@ RSpec.describe "bundle install with groups" do
expect(out).to include("Set for the current user (#{home(".bundle/config")}): [:emo]")
end
+ it "allows running application where groups where configured by a different user", :bundler => "< 3" do
+ bundle "config set without emo"
+ bundle :install
+ bundle "exec ruby -e 'puts 42'", :env => { "BUNDLE_USER_HOME" => tmp("new_home").to_s }
+ expect(out).to include("42")
+ end
+
it "does not install gems from the excluded group" do
bundle "config --local without emo"
bundle :install