File: test_notifier_reporter.rb

package info (click to toggle)
ruby-minitest-utils 0.2.4%2Bdebian-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 156 kB
  • ctags: 55
  • sloc: ruby: 355; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 405 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module Minitest
  module Utils
    class TestNotifierReporter < Minitest::StatisticsReporter
      def report
        super

        stats = TestNotifier::Stats.new(:minitest, {
          count: count,
          assertions: assertions,
          failures: failures,
          errors: errors
        })

        TestNotifier.notify(status: stats.status, message: stats.message)
      end
    end
  end
end