Skip to content

Commit

Permalink
Update fail_on_output to use capture_output when checking
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunemaker committed Aug 27, 2024
1 parent 16988d9 commit 028a9bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/support/fail_on_output.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 028a9bb

Please sign in to comment.