summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorColby Swandale <colby@taplaboratories.com>2017-11-19 15:14:26 +1100
committerColby Swandale <colby@taplaboratories.com>2017-11-19 15:14:26 +1100
commit666bb1d7520a2ceabd84a04d769eb572a410ff59 (patch)
tree2fc7ed1e27a8e042559fac881ea1ace5e365227b /spec
parent914a4a8b8d0cf1a79dbc7b334fbb5c2db1ecdc16 (diff)
downloadbundler-666bb1d7520a2ceabd84a04d769eb572a410ff59.tar.gz
add `--paths` option to `bundle list` command.
This option mimics the `--paths` options in `bundle show` which is being removed in bundler 2. Example Usage: $ bundle list --paths /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actioncable-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionmailer-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionpack-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionview-5.1.4
Diffstat (limited to 'spec')
-rw-r--r--spec/commands/list_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/commands/list_spec.rb b/spec/commands/list_spec.rb
index 0ea70f015c..7fb25963ec 100644
--- a/spec/commands/list_spec.rb
+++ b/spec/commands/list_spec.rb
@@ -15,6 +15,21 @@ RSpec.describe "bundle list", :bundler => "2" do
end
end
+ context "with paths option" do
+ before do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ gem "rails"
+ G
+ end
+ it "prints the path of each gem in the bundle" do
+ bundle "list --paths"
+ expect(out).to match(%r{.*\/rails\-2\.3\.2})
+ expect(out).to match(%r{.*\/rack\-1\.0\.0})
+ end
+ end
+
context "when no gems are in the gemfile" do
before do
install_gemfile <<-G