Class: Test::Unit::TestResult
- Inherits:
-
Object
- Object
- Test::Unit::TestResult
- Defined in:
- lib/common/atp_helper.rb
Overview
## 如果一切顺利,也要打印一个step ? …yes #if ENV == “pass” # Report.stepBegin self.to_s # Report.expect “all”,0 # Report.actual “all”,0 # Report.stepEnd #end #Report.caseEnd #Report.suiteEnd #Report.close end end
Instance Method Summary collapse
Instance Method Details
#notify_fault(fault) ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/common/atp_helper.rb', line 57 def notify_fault(fault) @faults << fault notify_listeners(FAULT, fault) return unless ENV.key? 'AT_LOGFILE' Report.stepBegin fault.test_name Report.expect "逻辑错误",0 Report.actual "逻辑错误",1 Report.more fault.short_display,fault.long_display Report.stepEnd # pass or not #ENV['PASS_OR_NOT'] = "not" end |
#summary ⇒ Object
52 53 54 55 56 |
# File 'lib/common/atp_helper.rb', line 52 def summary ["#{run_count} tests", "#{assertion_count} assertions", *@summary_generators.collect{|generator| send(generator)} ].join(", ") + ", hi atp!" end |