diff options
| author | Zack Hobson | 2013-12-10 15:30:13 -0800 | 
|---|---|---|
| committer | Zack Hobson | 2013-12-10 15:30:13 -0800 | 
| commit | c9d603a791e07e4e5b5dbd07cd7c5d1c27115d18 (patch) | |
| tree | 8728dd0b6b019c9940f2434d41fe7cf4c8e34d31 /test/test_helper.rb | |
| parent | 0d420ebc9d47d35ee2cf497f17a3b672b56537e0 (diff) | |
| download | hcl-c9d603a791e07e4e5b5dbd07cd7c5d1c27115d18.tar.bz2 | |
silence during testing!
Diffstat (limited to 'test/test_helper.rb')
| -rw-r--r-- | test/test_helper.rb | 25 | 
1 files changed, 20 insertions, 5 deletions
| diff --git a/test/test_helper.rb b/test/test_helper.rb index a09f25e..2fe445e 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -12,21 +12,36 @@ begin      minimum_coverage case RUBY_ENGINE        when "rbx" then 84        when "jruby" then 73 -      else 77 +      else 78      end    end  rescue LoadError => e    $stderr.puts 'No test coverage tools found, skipping coverage check.'  end +# override the default hcl dir +ENV['HCL_DIR'] = File.dirname(__FILE__)+"/dot_hcl" +require 'hcl' +  require 'minitest/autorun'  require 'mocha/setup'  require 'fileutils'  require 'fakeweb' -# override the default hcl dir -ENV['HCL_DIR'] = File.dirname(__FILE__)+"/dot_hcl" - -require 'hcl' +module IgnoreStderr +  def before_setup +    super +    $stderr = @stderr = StringIO.new +    $stdout = @stdout = StringIO.new +  end +  def after_teardown +    super +    $stderr = STDERR +    $stdout = STDOUT +  end +end +class HCl::TestCase < MiniTest::Unit::TestCase +  include IgnoreStderr +end | 
