Method: MotionSpec::ColorizedOutput#handle_summary
- Defined in:
- lib/motion-spec/output/colorized.rb
#handle_summary ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/motion-spec/output/colorized.rb', line 21 def handle_summary puts '' puts '', ErrorLog if Backtraces && !ErrorLog.empty? duration = '%0.2f' % (Time.now - @timer) puts '', "Finished in #{duration} seconds." failure = Counter[:errors] > 0 || Counter[:failed] > 0 color = failure ? RED : GREEN puts "#{color}%d tests, %d assertions, %d failures, %d errors#{RESET}" % Counter.values_at(:specifications, :requirements, :failed, :errors) puts '' end |