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 111
attr_reader :notifications
Instance Method Details
#add_notification(notification)
Records a Notification
.
# 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.
# 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