Class: MiniTest::Reporters::RubyMateReporter

Inherits:
Object
  • Object
show all
Includes:
MiniTest::Reporter
Defined in:
lib/minitest/reporters/ruby_mate_reporter.rb

Overview

Simple reporter designed for RubyMate.

Constant Summary

INFO_PADDING =
2

Instance Method Summary (collapse)

Methods included from MiniTest::Reporter

#after_suite, #before_suite, #before_test, #output, #pass, #print, #puts, #runner, #verbose?

Instance Method Details

- after_suites(suites, type)



40
41
42
43
44
45
46
47
48
49
# File 'lib/minitest/reporters/ruby_mate_reporter.rb', line 40

def after_suites(suites, type)
  total_time = Time.now - runner.start_time
  
  puts
  puts('Finished in %.5fs' % total_time)
  print('%d tests, %d assertions, ' % [runner.test_count, runner.assertion_count])
  print('%d failures, %d errors, ' % [runner.failures, runner.errors])
  print('%d skips' % runner.skips)
  puts
end

- before_suites(suites, type)



12
13
14
15
# File 'lib/minitest/reporters/ruby_mate_reporter.rb', line 12

def before_suites(suites, type)
  puts 'Started'
  puts
end

- error(suite, test, test_runner)



32
33
34
35
36
37
38
# File 'lib/minitest/reporters/ruby_mate_reporter.rb', line 32

def error(suite, test, test_runner)
  print 'ERROR'
  print_test_with_time(suite, test)
  puts
  print_info(test_runner.exception)
  puts
end

- failure(suite, test, test_runner)



24
25
26
27
28
29
30
# File 'lib/minitest/reporters/ruby_mate_reporter.rb', line 24

def failure(suite, test, test_runner)
  print 'FAIL'
  print_test_with_time(suite, test)
  puts
  print_info(test_runner.exception)
  puts
end

- skip(suite, test, test_runner)



17
18
19
20
21
22
# File 'lib/minitest/reporters/ruby_mate_reporter.rb', line 17

def skip(suite, test, test_runner)
  print 'SKIP'
  print_test_with_time(suite, test)
  puts
  puts
end