summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-11-26 21:53:48 +0000
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-12-13 20:07:18 +0100
commita137b11f1b727cfa0d4e3e92c72592181eb8645d (patch)
treef3533dda586f72ef0cc60efbfbbb3fb3b51732e2 /spec
parent098d6d961f9828c099b40a7e31d8de653a16c44b (diff)
downloadbundler-a137b11f1b727cfa0d4e3e92c72592181eb8645d.tar.gz
Merge #7419
7419: Add :glob to git source uniqueness r=deivid-rodriguez a=fatkodima Closes #7346 Co-authored-by: fatkodima <fatkodima123@gmail.com> (cherry picked from commit 87449d535a731b818411523e34468f1f548adca9)
Diffstat (limited to 'spec')
-rw-r--r--spec/install/git_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb
index c16285241f..cc8bf70b03 100644
--- a/spec/install/git_spec.rb
+++ b/spec/install/git_spec.rb
@@ -61,5 +61,25 @@ RSpec.describe "bundle install" do
expect(out).to include("Bundle complete!")
end
+
+ it "allows multiple gems from the same git source" do
+ build_repo2 do
+ build_lib "foo", "1.0", :path => lib_path("gems/foo")
+ build_lib "zebra", "2.0", :path => lib_path("gems/zebra")
+ build_git "gems", :path => lib_path("gems"), :gemspec => false
+ end
+
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo2)}"
+ gem "foo", :git => "#{lib_path("gems")}", :glob => "foo/*.gemspec"
+ gem "zebra", :git => "#{lib_path("gems")}", :glob => "zebra/*.gemspec"
+ G
+
+ bundle "info foo"
+ expect(out).to include("* foo (1.0 #{revision_for(lib_path("gems"))[0..6]})")
+
+ bundle "info zebra"
+ expect(out).to include("* zebra (2.0 #{revision_for(lib_path("gems"))[0..6]})")
+ end
end
end