summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-03-29 19:36:39 +0100
committerAndre Arko <andre@arko.net>2015-03-30 12:04:25 +0100
commit598c4ee83f233048fee38b59c21ebf140a24efe5 (patch)
treef5a65b9d346234231befea2626787248ef00980e
parent2aa826aedaebcad6d04cf6ad7139b196667dfba9 (diff)
downloadbundler-598c4ee83f233048fee38b59c21ebf140a24efe5.tar.gz
a failing spec for #3520
-rw-r--r--spec/install/gems/sources_spec.rb41
1 files changed, 41 insertions, 0 deletions
diff --git a/spec/install/gems/sources_spec.rb b/spec/install/gems/sources_spec.rb
index 376b105579..ddbb508749 100644
--- a/spec/install/gems/sources_spec.rb
+++ b/spec/install/gems/sources_spec.rb
@@ -289,4 +289,45 @@ describe "bundle install with gems on multiple sources" do
should_be_installed("rack 1.0.0")
end
end
+
+ context "when a single source contains multiple locked gems" do
+ before do
+ build_repo4 do
+ build_gem "foo", "0.2"
+ build_gem "bar", "0.1"
+ build_gem "bar", "0.3"
+ end
+
+ lockfile <<-G
+ GEM
+ remote: file:/Users/andre/src/bundler/bundler/tmp/gems/remote1/
+ remote: file:/Users/andre/src/bundler/bundler/tmp/gems/remote4/
+ specs:
+ bar (0.1)
+ foo (0.1)
+ rack (1.0.0)
+
+ PLATFORMS
+ ruby
+
+ DEPENDENCIES
+ bar (= 0.1)!
+ foo (= 0.1)!
+ rack
+ G
+ end
+
+ it "allows them to be unlocked separately" do
+ install_gemfile <<-G
+ source 'file://#{gem_repo1}'
+ gem 'rack'
+ gem 'foo', '~> 0.2', source: 'file://#{gem_repo4}'
+ gem 'bar', '~> 0.1', source: 'file://#{gem_repo4}'
+ G
+
+ should_be_installed("foo 0.2")
+ should_be_installed("bar 0.1")
+ end
+ end
+
end