Sha256: f56dfd79edb09112d8f725e982932b9048f4210992477dd5d4ebf36731cb6bc5

Contents?: true

Size: 655 Bytes

Versions: 6

Compression:

Stored size: 655 Bytes

Contents

describe "Mocha Teabag.Reporters.Console", ->

  beforeEach ->
    @runner = {on: @onSpy = sinon.spy()}
    @reporter = new Teabag.Reporters.Console(@runner)

  describe "constructor", ->

    it "registers for 'fail', 'test end', and 'end'", ->
      assert.calledWith(@onSpy, "fail", @reporter.reportSpecResults)
      assert.calledWith(@onSpy, "test end", @reporter.reportSpecResults)
      assert.calledWith(@onSpy, "end", @reporter.reportRunnerResults)


  describe "#reportSpecResults", ->

    it "sets the error if one is passed in", ->
      spec = {}
      @reporter.reportSpecResults(spec, foo: "bar")
      expect(spec.err).to.eql(foo: "bar")

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
teabag-0.3.5 spec/javascripts/teabag/mocha/reporters/console_mspec.coffee
teabag-0.3.4 spec/javascripts/teabag/mocha/reporters/console_mspec.coffee
teabag-0.3.3 spec/javascripts/teabag/mocha/reporters/console_mspec.coffee
teabag-0.3.2 spec/javascripts/teabag/mocha/reporters/console_mspec.coffee
teabag-0.3.1 spec/javascripts/teabag/mocha/reporters/console_mspec.coffee
teabag-0.3.0 spec/javascripts/teabag/mocha/reporters/console_mspec.coffee