From 028a9bb9a99df8ef01b0bac24edb9298bcec8d9e Mon Sep 17 00:00:00 2001 From: John Nunemaker Date: Tue, 27 Aug 2024 08:37:40 -0400 Subject: [PATCH] Update fail_on_output to use capture_output when checking --- spec/support/fail_on_output.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/fail_on_output.rb b/spec/support/fail_on_output.rb index a149845c..3a796c0f 100644 --- a/spec/support/fail_on_output.rb +++ b/spec/support/fail_on_output.rb @@ -1,7 +1,7 @@ if ENV["CI"] || ENV["FAIL_ON_OUTPUT"] RSpec.configure do |config| config.around do |example| - output = silence { example.run } + output = capture_output { example.run } fail "Use `silence { }` to avoid printing to STDOUT/STDERR\n#{output}" unless output.empty? end end