summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerence Lee <hone02@gmail.com>2012-03-06 16:36:01 -0800
committerTerence Lee <hone02@gmail.com>2012-03-06 16:36:55 -0800
commit8880307d836ddb87fb5a69b5829eb2ff2c46a8e3 (patch)
tree07c9ca71a65b51f6e6631fa19d635d7438fde7b1
parente538e3547c040bc55175c6ce49b2bf838beb2ab9 (diff)
downloadbundler-8880307d836ddb87fb5a69b5829eb2ff2c46a8e3.tar.gz
#1694: add failing test for duplicate git sources
-rw-r--r--spec/install/git_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb
index afc14cfe41..419f534da2 100644
--- a/spec/install/git_spec.rb
+++ b/spec/install/git_spec.rb
@@ -478,6 +478,22 @@ describe "bundle install with git sources" do
exitstatus.should == 0
end
+ it "does not duplicate git gem sources" do
+ build_lib "foo", :path => lib_path('nested/foo')
+ build_lib "bar", :path => lib_path('nested/bar')
+
+ build_git "foo", :path => lib_path('nested')
+ build_git "bar", :path => lib_path('nested')
+
+ gemfile <<-G
+ gem "foo", :git => "#{lib_path('nested')}"
+ gem "bar", :git => "#{lib_path('nested')}"
+ G
+
+ bundle "install"
+ File.read(bundled_app("Gemfile.lock")).scan('GIT').size.should == 1
+ end
+
describe "switching sources" do
it "doesn't explode when switching Path to Git sources" do
build_gem "foo", "1.0", :to_system => true do |s|