Class: RSpec::Notify
- Inherits:
-
Core::Formatters::DocumentationFormatter
- Object
- Core::Formatters::DocumentationFormatter
- RSpec::Notify
- Defined in:
- lib/rspec/notify.rb
Instance Method Summary collapse
- #dump_failures ⇒ Object
- #dump_pending ⇒ Object
- #dump_summary(duration, example_count, failure_count, pending_count) ⇒ Object
- #initalize ⇒ Object
- #message(message) ⇒ Object
Instance Method Details
#dump_failures ⇒ Object
13 14 |
# File 'lib/rspec/notify.rb', line 13 def dump_failures end |
#dump_pending ⇒ Object
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 |
#initalize ⇒ Object
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 () end |