test/test_helper.rb in collimator-0.0.2 vs test/test_helper.rb in collimator-0.0.3

- old
+ new

@@ -1,13 +1,26 @@ -require 'test/unit' +require 'minitest/autorun' +require 'minitest/reporters' + require File.expand_path('../../lib/collimator', __FILE__) require 'stringio' require 'date' -def capture_output - out = StringIO.new - $stdout = out - yield - return out -ensure - $stdout = STDOUT -end \ No newline at end of file +Minitest::Reporters.use! +Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new(:color => true)] + +class Minitest::Test + include Collimator + + def teardown + $stdout = STDOUT + end + + def capture_output + out = StringIO.new + $stdout = out + yield + return out + ensure + $stdout = STDOUT + end +end