diff options
author | The Bundler Bot <bot@bundler.io> | 2017-10-16 09:58:58 +0000 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-10-30 13:54:15 -0500 |
commit | 6b5ac1869efe3e93695096d4ff767b79764c073f (patch) | |
tree | a39353dc8b1928688cfce39fc9cdf05d91f281d0 /spec/install/gemfile | |
parent | 2378060cacdca7eaae0383f90dfba2169401dc37 (diff) | |
download | bundler-6b5ac1869efe3e93695096d4ff767b79764c073f.tar.gz |
Auto merge of #6098 - akhramov:fix/doubled-message-in-verbose-mode, r=segiddins
Fix doubled message in verbose mode
The problem was doubled informative message in verbose mode (#6028)
`Bundler::Definition#missing_specs?` clears the `@resolve` ivar due to
the fact that `ensure` clause evaluates regardless whether exception
occurred. That results in repeated resolution, and, therefore, in
repeated debug messages.
This change moves ivars clearing into the `rescue` clause, so
`@resolve` will be cleared only in case when `BundlerError` occurs
I chose this fix because running deps resolution twice is a bad idea anyway and it needs to be prevented.
(cherry picked from commit 6c90bcb2969a302c33c8117b50c06543f3ba4741)
Diffstat (limited to 'spec/install/gemfile')
-rw-r--r-- | spec/install/gemfile/gemspec_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/install/gemfile/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb index 6ab974ee41..1dc016ed23 100644 --- a/spec/install/gemfile/gemspec_spec.rb +++ b/spec/install/gemfile/gemspec_spec.rb @@ -145,7 +145,9 @@ RSpec.describe "bundle install from an existing gemspec" do G bundle! "install", :verbose => true - expect(out).to include("Found no changes, using resolution from the lockfile") + + message = "Found no changes, using resolution from the lockfile" + expect(out.scan(message).size).to eq(1) end it "should match a lockfile without needing to re-resolve with development dependencies" do @@ -162,7 +164,9 @@ RSpec.describe "bundle install from an existing gemspec" do G bundle! "install", :verbose => true - expect(out).to include("Found no changes, using resolution from the lockfile") + + message = "Found no changes, using resolution from the lockfile" + expect(out.scan(message).size).to eq(1) end it "should match a lockfile on non-ruby platforms with a transitive platform dependency" do |