diff options
author | fatkodima <fatkodima123@gmail.com> | 2019-10-31 15:01:39 +0200 |
---|---|---|
committer | fatkodima <fatkodima123@gmail.com> | 2019-11-01 15:56:41 +0200 |
commit | 95d7e474e454c79c7b6d73d96e36547e2f1f0e35 (patch) | |
tree | 3ef977a1728501b82a29407bd0bf66ebafae2c37 /spec/commands | |
parent | 49f585ca9e5ecf2f0cf5529e1b320ce07d443de9 (diff) | |
download | bundler-95d7e474e454c79c7b6d73d96e36547e2f1f0e35.tar.gz |
Support multiple groups for --without-group and --only-group options in bundler list command
Diffstat (limited to 'spec/commands')
-rw-r--r-- | spec/commands/list_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/commands/list_spec.rb b/spec/commands/list_spec.rb index 71d2136d38..60efd38cb7 100644 --- a/spec/commands/list_spec.rb +++ b/spec/commands/list_spec.rb @@ -24,6 +24,7 @@ RSpec.describe "bundle list" do gem "rack" gem "rspec", :group => [:test] + gem "rails", :group => [:production] G end @@ -32,6 +33,7 @@ RSpec.describe "bundle list" do bundle! "list --without-group test" expect(out).to include(" * rack (1.0.0)") + expect(out).to include(" * rails (2.3.2)") expect(out).not_to include(" * rspec (1.2.7)") end end @@ -43,6 +45,16 @@ RSpec.describe "bundle list" do expect(err).to eq "`random` group could not be found." end end + + context "when multiple groups" do + it "prints the gems not in the specified groups" do + bundle! "list --without-group test production" + + expect(out).to include(" * rack (1.0.0)") + expect(out).not_to include(" * rails (2.3.2)") + expect(out).not_to include(" * rspec (1.2.7)") + end + end end describe "with only-group option" do @@ -52,6 +64,7 @@ RSpec.describe "bundle list" do gem "rack" gem "rspec", :group => [:test] + gem "rails", :group => [:production] G end @@ -71,6 +84,16 @@ RSpec.describe "bundle list" do expect(err).to eq "`random` group could not be found." end end + + context "when multiple groups" do + it "prints the gems in the specified groups" do + bundle! "list --only-group default production" + + expect(out).to include(" * rack (1.0.0)") + expect(out).to include(" * rails (2.3.2)") + expect(out).not_to include(" * rspec (1.2.7)") + end + end end context "with name-only option" do |