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