Class: MicroTest::DefaultFormatter

Inherits:
BaseFormatter show all
Defined in:
lib/micro_test/formatters/default_formatter.rb

Instance Attribute Summary

Attributes inherited from BaseFormatter

#duration, #failed, #passed

Instance Method Summary collapse

Methods inherited from BaseFormatter

#after_class, #after_results, #before_suite, #before_test, inherited, #initialize, #render, #render_inline, set_short_name, short_name

Constructor Details

This class inherits a constructor from MicroTest::BaseFormatter

Instance Method Details

#after_suite(test_classes) ⇒ Object



19
20
21
# File 'lib/micro_test/formatters/default_formatter.rb', line 19

def after_suite(test_classes)
  render "default/suite"
end

#after_test(test) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/micro_test/formatters/default_formatter.rb', line 11

def after_test(test)
  if test.passed?
    render "default/test_pass", test
  else
    render "default/test_fail", test
  end
end

#before_class(test_class) ⇒ Object



7
8
9
# File 'lib/micro_test/formatters/default_formatter.rb', line 7

def before_class(test_class)
  render "default/class", test_class
end