summaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorZack Hobson2013-12-10 19:08:34 -0800
committerZack Hobson2013-12-10 19:08:34 -0800
commit6342ba68f15c37fc8fbc219eeeda7675ad29d5fd (patch)
tree0b5b6b6992e47efe2c76456de9a3c4e9f46fc2b5 /test/test_helper.rb
parent03aaebeac787a885fb82ce1745eb6c3d2aa78ef1 (diff)
downloadhcl-6342ba68f15c37fc8fbc219eeeda7675ad29d5fd.tar.bz2
capture_output: move to test/ext
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb26
1 files changed, 3 insertions, 23 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 8e1910a..42a072c 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -21,33 +21,13 @@ end
# override the default hcl dir
ENV['HCL_DIR'] = File.dirname(__FILE__)+"/dot_hcl"
-require 'hcl'
+require 'hcl'
require 'minitest/autorun'
require 'mocha/setup'
require 'fileutils'
require 'fakeweb'
-module CaptureOutput
- def before_setup
- super
- $stderr = @stderr = StringIO.new
- $stdout = @stdout = StringIO.new
- end
- def after_teardown
- super
- $stderr = STDERR
- $stdout = STDOUT
- end
- def error
- @stderr.string
- end
- def output
- @stdout.string
- end
-end
-class HCl::TestCase < MiniTest::Unit::TestCase
- include CaptureOutput
-end
-
+# require test extensions/helpers
+Dir[File.dirname(__FILE__) + '/ext/*.rb'].each { |ext| require ext }