summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-08-05 19:53:16 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-08-05 19:53:25 -0500
commit869602fcba53421e1162c449ac8f4a1ecb3119f8 (patch)
treea092c9ff02bed3788db38f296f339d8970d3091f
parentba12408dd1729a3364bace1e3ee517f01f28e9d8 (diff)
downloadbundler-seg-unlock-locals.tar.gz
Add a spec for unlocking when adding a dep & switching to a local sourceseg-unlock-locals
-rw-r--r--spec/install/gemfile/git_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/install/gemfile/git_spec.rb b/spec/install/gemfile/git_spec.rb
index d3ff35e982..bc9cc20870 100644
--- a/spec/install/gemfile/git_spec.rb
+++ b/spec/install/gemfile/git_spec.rb
@@ -250,6 +250,27 @@ describe "bundle install with git sources" do
expect(out).to eq("LOCAL")
end
+ it "unlocks the source when the dependencies have changed while switching to the local" do
+ build_git "rack", "0.8"
+
+ FileUtils.cp_r("#{lib_path("rack-0.8")}/.", lib_path("local-rack"))
+
+ update_git "rack", "0.8", :path => lib_path("local-rack") do |s|
+ s.write "rack.gemspec", build_spec("rack", "0.8") { runtime "rspec", "> 0" }.first.to_ruby
+ s.write "lib/rack.rb", "puts :LOCAL"
+ end
+
+ install_gemfile! <<-G
+ source "file://#{gem_repo1}"
+ gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master"
+ G
+
+ bundle! %(config local.rack #{lib_path("local-rack")})
+ bundle! :install
+ run! "require 'rack'"
+ expect(out).to eq("LOCAL")
+ end
+
it "updates specs on runtime" do
system_gems "nokogiri-1.4.2"