模块 Test::Unit::TestResultErrorSupport
属性
errors[R]
公共实例方法
add_error(error) 点击切换源码
记录一个 Test::Unit::Error
。
# File test-unit-3.6.7/lib/test/unit/error.rb, line 129 def add_error(error) @errors << error notify_fault(error) notify_changed end
error_count() 点击切换源码
返回此 TestResult
记录的错误数量。
# File test-unit-3.6.7/lib/test/unit/error.rb, line 137 def error_count @errors.size end
error_occurred?() 点击切换源码
# File test-unit-3.6.7/lib/test/unit/error.rb, line 141 def error_occurred? not @errors.empty? end
私有实例方法
error_summary() 点击切换源码
# File test-unit-3.6.7/lib/test/unit/error.rb, line 153 def error_summary "#{error_count} errors" end
initialize_containers() 点击切换源码
调用父类方法
# File test-unit-3.6.7/lib/test/unit/error.rb, line 146 def initialize_containers super @errors = [] @summary_generators << :error_summary @problem_checkers << :error_occurred? end