Sha256: 50d1f376712afe26d2fac205aa07741cee607dafa3afa88ad2a77f24411fdf19

Contents?: true

Size: 946 Bytes

Versions: 3

Compression:

Stored size: 946 Bytes

Contents

class Teaspoon.Jasmine2.Spec extends Teaspoon.Spec

  constructor: (@spec) ->
    @fullDescription = @spec.fullName
    @description = @spec.description
    @link = @filterUrl(@fullDescription)
    @parent = @spec.parent
    # spec may not have a parent if it's being focused
    @suiteName = @parent.fullName if @parent
    @viewId = @spec.id
    @pending = @spec.status == "pending"


  errors: ->
    return [] unless @spec.failedExpectations.length
    for item in @spec.failedExpectations
      {message: item.message, stack: item.stack}


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


  result: ->
    status: @status()
    skipped: @spec.status == "disabled" || @pending


  status: ->
    if @spec.status == "disabled" then "passed" else @spec.status

Version data entries

3 entries across 3 versions & 1 rubygems

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