Sha256: 2e492cfcdc5778291c80df10c09a228d9c68d1304bfc0fa0de5c10727aad4dbc

Contents?: true

Size: 565 Bytes

Versions: 2

Compression:

Stored size: 565 Bytes

Contents

require 'minitest/libnotify/notifier'

module Minitest
  module Libnotify
    class Reporter < StatisticsReporter
      def initialize
        super

        @notifier = Notifier.new
      end

      def report
        super

        notify
      end

    private

      def notify # :nodoc:
        stats = {
          :assertions => assertions,
          :failures   => failures,
          :errors     => errors,
          :skips      => skips
        }

        state = passed? ? :pass : :fail

        @notifier.notify(stats, state)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
minitest5-libnotify-0.0.2 lib/minitest/libnotify/reporter.rb
minitest5-libnotify-0.0.1 lib/minitest/libnotify/reporter.rb