Module: Test::Unit::TestResultNotificationSupport

Included in:
TestResult
Defined in:
lib/test/unit/notification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#notificationsObject (readonly)

Returns the value of attribute notifications.



106
107
108
# File 'lib/test/unit/notification.rb', line 106

def notifications
  @notifications
end

Instance Method Details

#add_notification(notification) ⇒ Object

Records a Test::Unit::Notification.



109
110
111
112
113
# File 'lib/test/unit/notification.rb', line 109

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

#notification_countObject

Returns the number of notifications this TestResult has recorded.



117
118
119
# File 'lib/test/unit/notification.rb', line 117

def notification_count
  @notifications.size
end