summaryrefslogtreecommitdiff
path: root/spec/commands
diff options
context:
space:
mode:
authorfatkodima <fatkodima123@gmail.com>2019-10-31 15:01:39 +0200
committerfatkodima <fatkodima123@gmail.com>2019-11-01 15:56:41 +0200
commit95d7e474e454c79c7b6d73d96e36547e2f1f0e35 (patch)
tree3ef977a1728501b82a29407bd0bf66ebafae2c37 /spec/commands
parent49f585ca9e5ecf2f0cf5529e1b320ce07d443de9 (diff)
downloadbundler-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.rb23
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