Class: Minitest::Reporters::RubyMateReporter

Inherits:
BaseReporter
  • Object
show all
Includes:
Minitest::RelativePosition
Defined in:
lib/minitest/reporters/ruby_mate_reporter.rb

Overview

Simple reporter designed for RubyMate.

Constant Summary collapse

INFO_PADDING =
2

Constants included from Minitest::RelativePosition

Minitest::RelativePosition::MARK_SIZE, Minitest::RelativePosition::TEST_PADDING, Minitest::RelativePosition::TEST_SIZE

Instance Attribute Summary

Attributes inherited from BaseReporter

#tests

Instance Method Summary collapse

Methods inherited from BaseReporter

#add_defaults, #after_test, #before_test, #initialize

Constructor Details

This class inherits a constructor from Minitest::Reporters::BaseReporter

Instance Method Details

#record(test)


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/minitest/reporters/ruby_mate_reporter.rb', line 15

def record(test)
  super
  if test.skipped?
    print 'SKIP'
    print_test_with_time(test)
    puts
    puts
  elsif test.error?
    print 'ERROR'
    print_test_with_time(test)
    puts
    print_info(test.failure)
    puts
  elsif test.failure
    print 'FAIL'
    print_test_with_time(test)
    puts
    print_info(test.failure, false)
    puts
  end
end

#report


37
38
39
40
41
42
43
44
45
# File 'lib/minitest/reporters/ruby_mate_reporter.rb', line 37

def report
  super
  puts
  puts('Finished in %.5fs' % total_time)
  print('%d tests, %d assertions, ' % [count, assertions])
  print('%d failures, %d errors, ' % [failures, errors])
  print('%d skips' % skips)
  puts
end

#start


9
10
11
12
13
# File 'lib/minitest/reporters/ruby_mate_reporter.rb', line 9

def start
  super
  puts('Started with run options %s' % options[:args])
  puts
end