summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/list_spec.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-08 14:19:04 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-13 07:54:37 +0900
commit0e60b59d5884edb8f9aea023efd9b24f1ff02049 (patch)
treee52935ce510440872ca5ce6b0e092cbc94f18bc9 /spec/bundler/commands/list_spec.rb
parent68224651a4d4dc3ce0cea666f5423dd8b6ba6cfc (diff)
Update the bundler version with master branch
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3086
Diffstat (limited to 'spec/bundler/commands/list_spec.rb')
-rw-r--r--spec/bundler/commands/list_spec.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/bundler/commands/list_spec.rb b/spec/bundler/commands/list_spec.rb
index 71d2136d38..60efd38cb7 100644
--- a/spec/bundler/commands/list_spec.rb
+++ b/spec/bundler/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