class Minitest::Reporters::SpecReporter
@see gist.github.com/356945 paydro’s monkey-patch
@see github.com/TwP/turn turn
Based upon TwP’s turn (MIT License) and paydro’s monkey-patch.
Turn-like reporter that reads like a spec.
def after_suite(suite)
def after_suite(suite) puts end
def before_suite(suite)
def before_suite(suite) puts suite end
def record(test)
def record(test) super test.name.gsub!(/^test_:/, 'test:') print pad_test(test.name) print_colored_status(test) print(" (%.2fs)" % test.time) unless test.time.nil? puts if !test.skipped? && test.failure print_info(test.failure) puts end end
def report
def report super puts('Finished in %.5fs' % total_time) print('%d tests, %d assertions, ' % [count, assertions]) color = failures.zero? && errors.zero? ? :green : :red print(send(color) { '%d failures, %d errors, ' } % [failures, errors]) print(yellow { '%d skips' } % skips) puts end
def start
def start super puts('Started with run options %s' % options[:args]) puts end