Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env CAPTURE_STDERR=false lets devs see hard failures #1178

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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