Skip to content

Commit

Permalink
Merge pull request #1178 from bf4/opt_out_capturing_stderr_warnings
Browse files Browse the repository at this point in the history
env CAPTURE_STDERR=false lets devs see hard failures
  • Loading branch information
NullVoxPopuli committed Sep 18, 2015
2 parents 7c82258 + 2e72223 commit 7cf0e93
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ def Minitest.after_run(&block)
end
end

require 'capture_warnings'
CaptureWarnings.new(_fail_build = true).execute!
# If there's no failure info, try disabling capturing stderr:
# `env CAPTURE_STDERR=false rake`
# This is way easier than writing a Minitest plugin
# for 4.x and 5.x.
if ENV['CAPTURE_STDERR'] !~ /false|1/i
require 'capture_warnings'
CaptureWarnings.new(_fail_build = true).execute!
end

require 'active_model_serializers'

Expand Down

0 comments on commit 7cf0e93

Please sign in to comment.