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 109

attr_reader :notifications

Instance Method Details

#add_notification(notification)

Records a Notification.

[ GitHub ]

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

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

#initialize_containers (private)

[ GitHub ]

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

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 120

def notification_count
  @notifications.size
end

#notification_summary (private)

[ GitHub ]

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

def notification_summary
  "#{notification_count} notifications"
end