Sha256: 5f1bd4d4d234329b0907daa7807a54495722a634f57451461df454b6cc28c85f
Contents?: true
Size: 1.76 KB
Versions: 6
Compression:
Stored size: 1.76 KB
Contents
class Teabag.Reporters.Console constructor: -> @start = new Teabag.Date() @suites = {} reportRunnerStarting: (runner) -> @log type: "runner" total: runner.total || runner.specs().length start: JSON.parse(JSON.stringify(@start)) reportSuites: -> for suite, index in @spec.getParents() continue if @suites[suite.fullDescription] @suites[suite.fullDescription] = true @log type: "suite" label: suite.description level: index reportSpecResults: (spec) -> @spec = new Teabag.Spec(spec) result = @spec.result() return if result.skipped @reportSuites() switch result.status when "pending" then @trackPending() when "failed" then @trackFailure() else @log type: "spec" suite: @spec.suiteName label: @spec.description status: result.status skipped: result.skipped trackPending: -> result = @spec.result() @log type: "spec" suite: @spec.suiteName label: @spec.description status: result.status skipped: result.skipped trackFailure: -> result = @spec.result() for error in @spec.errors() @log type: "spec" suite: @spec.suiteName label: @spec.description status: result.status skipped: result.skipped link: @spec.fullDescription message: error.message trace: error.stack || error.message || "Stack Trace Unavailable" reportRunnerResults: => @log type: "result" elapsed: ((new Teabag.Date().getTime() - @start.getTime()) / 1000).toFixed(5) Teabag.finished = true log: (obj = {}) -> obj["_teabag"] = true Teabag.log(JSON.stringify(obj))
Version data entries
6 entries across 6 versions & 1 rubygems