class Nc

Constants

FAILURE_EMOJI
SUCCESS_EMOJI

Public Instance Methods

dump_summary(notification) click to toggle source
# File lib/nc.rb, line 10
def dump_summary(notification)
  body = "Finished in #{notification.formatted_duration}\n#{notification.totals_line}"
  title = if notification.failure_count > 0
    "#{FAILURE_EMOJI} #{directory_name}: #{notification.failure_count} failed example#{notification.failure_count == 1 ? nil : 's'}"
  else
    "#{SUCCESS_EMOJI} #{directory_name}: Success"
  end
  TerminalNotifier.notify body, title: title
end

Private Instance Methods

directory_name() click to toggle source
# File lib/nc.rb, line 22
def directory_name
  File.basename File.expand_path '.'
end