模块 Test::Unit::TestResultNotificationSupport

属性

notifications[R]

公共实例方法

add_notification(notification) 点击切换源代码

记录一个 Test::Unit::Notification

# File test-unit-3.6.7/lib/test/unit/notification.rb, line 114
def add_notification(notification)
  @notifications << notification
  notify_fault(notification)
  notify_changed
end
notification_count() 点击切换源代码

返回此 TestResult 记录的通知数量。

# File test-unit-3.6.7/lib/test/unit/notification.rb, line 122
def notification_count
  @notifications.size
end

私有实例方法

initialize_containers() 点击切换源代码
调用超类方法
# File test-unit-3.6.7/lib/test/unit/notification.rb, line 127
def initialize_containers
  super
  @notifications = []
  @summary_generators << :notification_summary
end
notification_summary() 点击切换源代码
# File test-unit-3.6.7/lib/test/unit/notification.rb, line 133
def notification_summary
  "#{notification_count} notifications"
end