diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-01 23:29:38 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-01 23:29:38 +0000 |
commit | be7b5929126cb3e696ef222339237faba9b8fe5a (patch) | |
tree | 51eae376f93c09bc82dde5a657a91df2c89062e4 /spec/bundler/commands/list_spec.rb | |
parent | ae49dbd392083f69026f2a0fff4a1d5f42d172a7 (diff) | |
download | ruby-be7b5929126cb3e696ef222339237faba9b8fe5a.tar.gz |
Update bundled bundler to 1.16.0.
* lib/bundler, spec/bundler: Merge bundler-1.16.0.
* common.mk: rspec examples of bundler-1.16.0 needs require option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/commands/list_spec.rb')
-rw-r--r-- | spec/bundler/commands/list_spec.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/bundler/commands/list_spec.rb b/spec/bundler/commands/list_spec.rb new file mode 100644 index 0000000000..0ea70f015c --- /dev/null +++ b/spec/bundler/commands/list_spec.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +RSpec.describe "bundle list", :bundler => "2" do + before do + install_gemfile <<-G + source "file://#{gem_repo1}" + gem "rack" + G + end + + context "with name-only option" do + it "prints only the name of the gems in the bundle" do + bundle "list --name-only" + expect(out).to eq "rack" + end + end + + context "when no gems are in the gemfile" do + before do + install_gemfile <<-G + source "file://#{gem_repo1}" + G + end + + it "prints message saying no gems are in the bundle" do + bundle "list" + expect(out).to include("No gems in the Gemfile") + end + end + + it "lists gems installed in the bundle" do + bundle "list" + expect(out).to include(" * rack (1.0.0)") + end + + it "aliases the ls command to list" do + bundle "ls" + expect(out).to include("Gems included by the bundle") + end +end |