summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarlo <karlo@aelogica.com>2015-06-22 18:30:04 +0800
committerAndre Arko <andre@arko.net>2015-06-23 21:31:50 -0700
commit51dcc46aef5d1cb34f21097c39f8e8711504644c (patch)
treea284518b5f538e55f04d79a66f290d44be98e9bc
parent251ac9037bad90f7b6cca2c06a05ac348fc04548 (diff)
downloadbundler-51dcc46aef5d1cb34f21097c39f8e8711504644c.tar.gz
Add test to ensure that bundle install --force doesn't leave any old code on gem reinstall
-rw-r--r--spec/install/force_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/install/force_spec.rb b/spec/install/force_spec.rb
index 1ab408b009..87cc0a2c12 100644
--- a/spec/install/force_spec.rb
+++ b/spec/install/force_spec.rb
@@ -18,6 +18,14 @@ describe "bundle install" do
expect(exitstatus).to eq(0) if exitstatus
end
+ it "overwrites old gem code" do
+ bundle "install"
+ default_bundle_path("gems/rack-1.0.0/lib/rack.rb").open('w'){|f| f.write("blah blah blah") }
+ bundle "install --force"
+
+ expect(default_bundle_path("gems/rack-1.0.0/lib/rack.rb").open{|f| f.read }).to eq("RACK = '1.0.0'\n")
+ end
+
it "doesn't reinstall bundler" do
bundle "install"
bundle "install --force"