Round spec time to 2 decimal points

This commit is contained in:
Kevin Sawicki
2013-02-12 14:48:16 -08:00
parent f19e536b25
commit 2910a90916

View File

@@ -92,7 +92,9 @@ class AtomReporter extends View
rootSuite = rootSuite.parentSuite while rootSuite.parentSuite
@message.text rootSuite.description
@time.text ((new Date().getTime() - @startedAt.getTime()) / 1000) + "s"
time = "#{Math.round((new Date().getTime() - @startedAt.getTime()) / 10)}"
time = "0#{time}" if time.length < 3
@time.text "#{time[0...-2]}.#{time[-2..]}s"
addSpecs: (specs) ->
for spec in specs