Skip to content

Commit

Permalink
supress console output during rspec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mifrill committed Nov 14, 2018
1 parent 8f52094 commit a61f3b5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,15 @@
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

0 comments on commit a61f3b5

Please sign in to comment.