diff options
Diffstat (limited to 'spec/bundler/install/failure_spec.rb')
-rw-r--r-- | spec/bundler/install/failure_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/bundler/install/failure_spec.rb b/spec/bundler/install/failure_spec.rb index b4cdf13857..49e2771dca 100644 --- a/spec/bundler/install/failure_spec.rb +++ b/spec/bundler/install/failure_spec.rb @@ -121,5 +121,24 @@ In Gemfile: activesupport M end + + context "because the downloaded .gem was invalid" do + before do + build_repo4 do + build_gem "a" + end + + gem_repo4("gems", "a-1.0.gem").open("w") {|f| f << "<html></html>" } + end + + it "removes the downloaded .gem" do + install_gemfile <<-G + source "file:#{gem_repo4}" + gem "a" + G + + expect(default_bundle_path("cache", "a-1.0.gem")).not_to exist + end + end end end |