123456789_123456789_123456789_123456789_123456789_

Module: Test::Unit::TestResultNotificationSupport

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/test/unit/notification.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#notifications (readonly)

[ GitHub ]

  
# File 'lib/test/unit/notification.rb', line 111

attr_reader :notifications

Instance Method Details

#add_notification(notification)

Records a Notification.

[ GitHub ]

  
# File 'lib/test/unit/notification.rb', line 114

def add_notification(notification)
  @notifications << notification
  notify_fault(notification)
  notify_changed
end

#initialize_containers (private)

[ GitHub ]

  
# File 'lib/test/unit/notification.rb', line 127

def initialize_containers
  super
  @notifications = []
  @summary_generators << :notification_summary
end

#notification_count

Returns the number of notifications this TestResult has recorded.

[ GitHub ]

  
# File 'lib/test/unit/notification.rb', line 122

def notification_count
  @notifications.size
end

#notification_summary (private)

[ GitHub ]

  
# File 'lib/test/unit/notification.rb', line 133

def notification_summary
  "#{notification_count} notifications"
end