diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-08-02 10:34:05 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-08-03 09:26:06 -0500 |
commit | 25fcc0bbc710464c37dbba988b865973fb79fed4 (patch) | |
tree | 49dca685f31dfae791acea38788d667b0ce5c31d | |
parent | 1056356adf7b870196e99dfab6b8c16789d07290 (diff) | |
download | bundler-25fcc0bbc710464c37dbba988b865973fb79fed4.tar.gz |
Update resolving specs for not printing errors immediatelyseg-expect-err
-rw-r--r-- | spec/install/gems/resolving_spec.rb | 14 | ||||
-rw-r--r-- | spec/support/helpers.rb | 4 |
2 files changed, 7 insertions, 11 deletions
diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb index 46c118b165..816799c0f8 100644 --- a/spec/install/gems/resolving_spec.rb +++ b/spec/install/gems/resolving_spec.rb @@ -76,11 +76,9 @@ describe "bundle install with install-time dependencies" do gem "net_e" G - resolve_output = capture(:stdout) do - bundle :install, :env => { "DEBUG_RESOLVER" => "1" } - end + bundle :install, :env => { "DEBUG_RESOLVER" => "1" } - expect(resolve_output).to include("Creating possibility state for net_c") + expect(err).to include("Creating possibility state for net_c") end end @@ -92,12 +90,10 @@ describe "bundle install with install-time dependencies" do gem "net_e" G - resolve_output = capture(:stdout) do - bundle :install, :env => { "DEBUG_RESOLVER_TREE" => "1" } - end + bundle :install, :env => { "DEBUG_RESOLVER_TREE" => "1" } - expect(resolve_output).to include(" net_b") - expect(resolve_output).to include(" net_build_extensions (1.0)") + expect(err).to include(" net_b") + expect(err).to include(" net_build_extensions (1.0)") end end end diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index 06f3142941..0f4e6f0402 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -158,7 +158,7 @@ module Spec args = args.gsub(/(?=")/, "\\") args = %("#{args}") end - sys_exec("#{Gem.ruby} -rubygems -S gem --backtrace #{command} #{args}", options[:expect_err]) + sys_exec("#{Gem.ruby} -rubygems -S gem --backtrace #{command} #{args}") end bang :gem_command @@ -172,7 +172,7 @@ module Spec @err = Thread.new { stderr.read }.value.strip end - @all_output << [ + (@all_output ||= String.new) << [ "$ #{cmd.to_s.strip}", out, err, |