Sha256: 085d9f68ae9d6a2682dd45d231af259dce24f8bca41a80e317ffbdc5a060f0de
Contents?: true
Size: 862 Bytes
Versions: 9
Compression:
Stored size: 862 Bytes
Contents
describe "Mocha Teaspoon.Reporters.Console", -> beforeEach -> @runner = {on: @onSpy = sinon.spy()} @reportRunnerStartingSpy = Teaspoon.Reporters.Console.prototype.reportRunnerStarting = sinon.spy() @reporter = new Teaspoon.Reporters.Console(@runner) describe "constructor", -> it "calls reporterRunnerStarting", -> assert.calledOnce(@reportRunnerStartingSpy, "foo") 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
9 entries across 9 versions & 1 rubygems