Sha256: 6851a7d41e7a8c649f546427663483dd5f78c0b31a912f0e53e2a1a529a9b9f3

Contents?: true

Size: 951 Bytes

Versions: 6

Compression:

Stored size: 951 Bytes

Contents

describe "Teabag", ->

  describe "class level API", ->

    it "has the expected API", ->
      return unless Object.keys # can't test in ie
      keys = Object.keys(Teabag)
      # common
      expect(keys).toContain("defer")
      expect(keys).toContain("slow")
      expect(keys).toContain("root")
      expect(keys).toContain("finished")
      expect(keys).toContain("execute")
      expect(keys).toContain("version")
      # caching
      expect(keys).toContain("Date")
      expect(keys).toContain("location")
      expect(keys).toContain("console")


  describe ".execute", ->

    beforeEach ->
      Teabag.defer = false

    it "allows defering (thus not instantiating the runner)", ->
      Teabag.defer = true
      spy = spyOn(Teabag, "Runner")
      Teabag.execute()
      expect(spy).wasNotCalled()

    it "will execute if it should", ->
      spy = spyOn(Teabag, "Runner")
      Teabag.execute()
      expect(spy).toHaveBeenCalled()

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
teabag-0.5.5 spec/javascripts/teabag/base/teabag_spec.coffee
teabag-0.5.4 spec/javascripts/teabag/base/teabag_spec.coffee
teabag-0.5.3 spec/javascripts/teabag/base/teabag_spec.coffee
teabag-0.5.2 spec/javascripts/teabag/base/teabag_spec.coffee
teabag-0.5.1 spec/javascripts/teabag/base/teabag_spec.coffee
teabag-0.5.0 spec/javascripts/teabag/base/teabag_spec.coffee