Class: MicroTest::DefaultAsyncFormatter
- Inherits:
-
BaseFormatter
- Object
- BaseFormatter
- MicroTest::DefaultAsyncFormatter
- Defined in:
- lib/micro_test/formatters/default_async_formatter.rb
Instance Attribute Summary
Attributes inherited from BaseFormatter
Instance Method Summary collapse
Methods inherited from BaseFormatter
#after_class, #after_results, #before_class, #before_suite, #before_test, inherited, #initialize, set_short_name, short_name
Constructor Details
This class inherits a constructor from MicroTest::BaseFormatter
Instance Method Details
#after_suite(test_classes) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/micro_test/formatters/default_async_formatter.rb', line 11 def after_suite(test_classes) puts test_classes.each do |test_class| print_output_for_test_class test_class end puts puts "".ljust(80, "-") print " #{passed + failed} Tests finished in #{yellow duration} seconds. " totals = [] totals << green("#{passed} Passed") if passed > 0 totals << red("#{failed} Failed") if failed > 0 print "(#{totals.join(", ")})" puts puts end |
#after_test(test) ⇒ Object
7 8 9 |
# File 'lib/micro_test/formatters/default_async_formatter.rb', line 7 def after_test(test) test.passed? ? print(green ".") : print(red ".") end |