From 45fe7f757522ed7d1d3ec754da59d41d45dd6bab Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sat, 3 Sep 2022 13:30:07 -0400 Subject: [rubygems/rubygems] Feature: `bundle add` supports `--path` option https://github.com/rubygems/rubygems/commit/32bee01fbe --- spec/bundler/commands/add_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/bundler') diff --git a/spec/bundler/commands/add_spec.rb b/spec/bundler/commands/add_spec.rb index 96ea238063..36d7616949 100644 --- a/spec/bundler/commands/add_spec.rb +++ b/spec/bundler/commands/add_spec.rb @@ -103,6 +103,15 @@ RSpec.describe "bundle add" do end end + describe "with --path" do + it "adds dependency with specified path" do + bundle "add 'foo' --path='#{lib_path("foo-2.0")}'" + + expect(bundled_app_gemfile.read).to match(/gem "foo", "~> 2.0", :path => "#{lib_path("foo-2.0")}"/) + expect(the_bundle).to include_gems "foo 2.0" + end + end + describe "with --git" do it "adds dependency with specified git source" do bundle "add foo --git=#{lib_path("foo-2.0")}" -- cgit v1.2.3