class Minitest::Reporters::MacosNotificationReporter

Public Instance Methods

report() click to toggle source
Calls superclass method
# File lib/minitest/reporters/macos_notification_reporter.rb, line 10
def report
  super
  show_notification if OS.mac?
end

Private Instance Methods

show_notification() click to toggle source
# File lib/minitest/reporters/macos_notification_reporter.rb, line 17
def show_notification
  text = "#{total_count} tests, #{failures} failures, #{errors} errors, #{skips} skips in #{total_time}"
  title = options[:title] || "Minitest"
  subtitle = (passed? ? "\u{1F49A} Success" : "\u{1F494} Failed")
  group = title.downcase.tr(" ", "-")

  TerminalNotifier.notify(text, title: title, subtitle: subtitle, group: group)
end