class NcFirstFail

Public Instance Methods

dump_summary(notification) click to toggle source
Calls superclass method Nc#dump_summary
# File lib/nc_first_fail.rb, line 16
def dump_summary(notification)
  if notification.failure_count == 0
    super
  end
end
example_failed(notification) click to toggle source
# File lib/nc_first_fail.rb, line 6
def example_failed(notification)
  example = notification.example
  body = "#{example.metadata[:full_description]}\n#{example.exception}"
  title = "#{FAILURE_EMOJI} #{directory_name}: Failure"
  unless @failed
    TerminalNotifier.notify body, title: title
  end
  @failed = true
end