diff options
Diffstat (limited to 'spec/spec_helper.rb')
| -rw-r--r-- | spec/spec_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a093008..f35cf55 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,4 +6,15 @@ RSpec.configure do |c| c.include Helpers c.color = true c.formatter = :documentation if ENV["USE_REPORTERS"] + original_stderr = $stderr + original_stdout = $stdout + c.before(:all) do + # Redirect stderr and stdout + $stderr = File.open(File::NULL, "w") + $stdout = File.open(File::NULL, "w") + end + c.after(:all) do + $stderr = original_stderr + $stdout = original_stdout + end end |
