summaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
blob: f35cf55de74b2f39d08ae69a47bbbe622edbea73 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'simplecov'
require 'roo'
require 'helpers'

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