mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
be7b592912
* 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
40 lines
890 B
Ruby
40 lines
890 B
Ruby
# 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
|