Class: Minitest::Flash::Reporter

Inherits:
StatisticsReporter
  • Object
show all
Defined in:
lib/minitest/flash/reporter.rb

Instance Method Summary collapse

Instance Method Details

#add_defaults(defaults) ⇒ Object

When using the following methods together with ‘minitest-reporters`, they are required.



20
# File 'lib/minitest/flash/reporter.rb', line 20

def add_defaults(defaults); end

#after_test(test) ⇒ Object



22
# File 'lib/minitest/flash/reporter.rb', line 22

def after_test(test); end

#before_test(test) ⇒ Object



21
# File 'lib/minitest/flash/reporter.rb', line 21

def before_test(test); end

#reportObject



6
7
8
9
10
11
12
# File 'lib/minitest/flash/reporter.rb', line 6

def report
  super
  begin
    `minitest-flash #{test_color}`
  rescue Errno::ENOENT
  end
end

#test_colorObject



14
15
16
# File 'lib/minitest/flash/reporter.rb', line 14

def test_color
  errors == 0 && failures == 0 ? :green : :red
end