Class: RSpec::Notify

Inherits:
Core::Formatters::DocumentationFormatter
  • Object
show all
Defined in:
lib/rspec/notify.rb

Instance Method Summary collapse

Instance Method Details

#dump_failuresObject



13
14
# File 'lib/rspec/notify.rb', line 13

def dump_failures
end

#dump_pendingObject



10
11
# File 'lib/rspec/notify.rb', line 10

def dump_pending
end

#dump_summary(duration, example_count, failure_count, pending_count) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/rspec/notify.rb', line 19

def dump_summary(duration, example_count, failure_count, pending_count)
  summary =
    "#{example_count} examples, #{failure_count} failures, #{pending_count} pending"
  success_count = example_count - failure_count
  icon = read_icon(success_count, failure_count, pending_count)

  title = "#{(success_count / example_count.to_f * 100).round(2)}% passed"
  g = Growl.new "localhost", "rspec-growl"
  g.add_notification("notification", "rspec Notification", icon)
  g.notify "notification", title, summary
end

#initalizeObject



6
7
8
# File 'lib/rspec/notify.rb', line 6

def initalize
  @summary = ""
end

#message(message) ⇒ Object



16
17
# File 'lib/rspec/notify.rb', line 16

def message(message)
end