Sha256: 1d535c346b18667bc02e23cc21e6e83197e885ba0e775291b146f53fbc1c0c0f

Contents?: true

Size: 930 Bytes

Versions: 3

Compression:

Stored size: 930 Bytes

Contents

class Teaspoon.Jasmine1.Spec extends Teaspoon.Spec

  constructor: (@spec) ->
    @fullDescription = @spec.getFullName()
    @description = @spec.description
    @link = @filterUrl(@fullDescription)
    @parent = @spec.suite
    @suiteName = @parent.getFullName()
    @viewId = @spec.viewId
    @pending = @spec.pending


  errors: ->
    return [] unless @spec.results
    for item in @spec.results().getItems()
      continue if item.passed()
      {message: item.message, stack: item.trace.stack}


  getParents: ->
    return @parents if @parents
    @parents ||= []
    parent = @parent
    while parent
      parent = new Teaspoon.Jasmine1.Suite(parent)
      @parents.unshift(parent)
      parent = parent.parent
    @parents


  result: ->
    results = @spec.results()
    status = "failed"
    status = "passed" if results.passed()
    status = "pending" if @spec.pending
    status: status
    skipped: results.skipped

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
teaspoon-jasmine-2.9.1 lib/teaspoon/jasmine/assets/teaspoon/jasmine1/spec.coffee
teaspoon-jasmine-2.4.1 lib/teaspoon/jasmine/assets/teaspoon/jasmine1/spec.coffee
teaspoon-jasmine-2.3.4 lib/teaspoon/jasmine/assets/teaspoon/jasmine1/spec.coffee