Module: Test::Unit::TestResultNotificationSupport
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/test/unit/notification.rb |
Instance Attribute Summary
- #notifications readonly
Instance Method Summary
-
#add_notification(notification)
Records a Notification.
-
#notification_count
Returns the number of notifications this TestResult has recorded.
- #initialize_containers private
- #notification_summary private
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.
# 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.
# 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