diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-05-28 22:38:04 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-05 07:32:42 +0900 |
commit | 332ecb0ad1fd5cda138a36cc40891d78517d1fff (patch) | |
tree | 9f32e1a6feb5f987446ee04b36ea848c840e66c1 /spec/bundler | |
parent | 6b7a0c0ca7102c2891b75cd6ef7429dd90d931c3 (diff) | |
download | ruby-332ecb0ad1fd5cda138a36cc40891d78517d1fff.tar.gz |
[rubygems/rubygems] Fix `bundle install` unintentionally saving configuration
Even if no explicit flags were passed to it.
https://github.com/rubygems/rubygems/commit/0598cbb68c
Diffstat (limited to 'spec/bundler')
-rw-r--r-- | spec/bundler/install/gemfile/groups_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/bundler/install/gemfile/groups_spec.rb b/spec/bundler/install/gemfile/groups_spec.rb index 0d3cc60195..8ace6719cb 100644 --- a/spec/bundler/install/gemfile/groups_spec.rb +++ b/spec/bundler/install/gemfile/groups_spec.rb @@ -90,6 +90,15 @@ 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" + bundle! :install + expect(the_bundle).to include_gems "rack 1.0.0", :groups => [:default] + bundle "config list" + expect(out).not_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 "does not install gems from the excluded group" do bundle :install, :without => "emo" expect(the_bundle).not_to include_gems "activesupport 2.3.5", :groups => [:default] |