summaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb25
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