Class: MiniTest::Reporters::GuardReporter

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

Instance Method Summary collapse

Methods included from MiniTest::Reporter

#after_suite, #after_test, #before_suite, #before_suites, #before_test, #error, #failure, #filter_backtrace, #output, #pass, #print, #puts, #runner, #skip, #verbose?

Instance Method Details

#after_suites(*args)



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

def after_suites(*args)
  duration = Time.now - runner.suites_start_time
  notifier_class.notify(runner.test_count, runner.assertion_count,
                       runner.failures, runner.errors,
                       runner.skips, duration)
end

#notifier_class



13
14
15
16
17
18
19
20
21
22
# File 'lib/minitest/reporters/guard_reporter.rb', line 13

def notifier_class
  if ::Guard.const_defined? "MinitestNotifier"
    # old guard-minitest API prior to 1.0.0.beta.2
    ::Guard::MinitestNotifier
  elsif ::Guard.const_defined? "Minitest" and ::Guard::Minitest.const_defined? "Notifier"
    # new guard-minitest API, by 02b46ee in between
    # 1.0.0.beta1 and 1.0.0.beta.2
    ::Guard::Minitest::Notifier
  end
end