o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1371410625.5996218: @value"ÿ{I" class:EFI"ProcessedAsset;FI"logical_path;FI",teaspoon/base/reporters/console_spec.js;FI" pathname;FI"d/Users/jejacks0n/Projects/teaspoon/spec/javascripts/teaspoon/base/reporters/console_spec.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2013-06-16T11:48:01-06:00;FI" length;Fi¢I" digest;F"%5fc63765c2348f7bc1fca9f7cc899991I" source;FI"¢(function() { describe("Teaspoon.Reporters.Console", function() { beforeEach(function() { this.logSpy = spyOn(Teaspoon, "log"); spyOn(Date.prototype, "getTime").andReturn(666); this.spec = { fullDescription: "_spec_description_", description: "_spec_name_", suiteName: "_suite_name_", link: "?grep=_spec_description_", result: function() { return { status: "passed", skipped: false }; }, errors: function() { return [ { message: "_message_", trace: { stack: "_stack_" } } ]; }, getParents: function() { return [ { fullDescription: "_suite_full_description", description: "_suite_description_" } ]; } }; this.reporter = new Teaspoon.Reporters.Console(); this.reporter.spec = this.spec; return this.normalizeSpy = spyOn(Teaspoon, "Spec").andReturn(this.spec); }); describe("constructor", function() { return it("tracks failures, pending, total, and start time", function() { return expect(this.reporter.start).toBeDefined(); }); }); describe("#reportRunnerStarting", function() { return it("logs the information", function() { var spy; spy = spyOn(this.reporter, "log"); spyOn(JSON, 'parse').andReturn('_date_time_'); this.reporter.reportRunnerStarting({ total: 42 }); return expect(spy).toHaveBeenCalledWith({ type: "runner", total: 42, start: "_date_time_" }); }); }); describe("#reportSuites", function() { it("logs the information", function() { var spy; spy = spyOn(this.reporter, "log"); this.reporter.reportSuites(); return expect(spy).toHaveBeenCalledWith({ type: "suite", label: "_suite_description_", level: 0 }); }); return it("doesn't log the suite more than once.", function() { var spy; spy = spyOn(this.reporter, "log"); this.reporter.reportSuites(); this.reporter.reportSuites(); return expect(spy.callCount).toBe(1); }); }); describe("#reportSpecResults", function() { it("normalizes the spec", function() { this.reporter.reportSpecResults(); return expect(this.normalizeSpy).toHaveBeenCalled(); }); it("logs the information", function() { var spy; spy = spyOn(this.reporter, "log"); this.reporter.reportSpecResults(); return expect(spy).toHaveBeenCalledWith({ type: "spec", suite: "_suite_name_", label: "_spec_name_", status: "passed", skipped: false }); }); describe("pending tests", function() { beforeEach(function() { this.trackSpy = spyOn(this.reporter, "trackPending"); return this.spec.result = function() { return { status: "pending", skipped: false }; }; }); return it("tracks that it was pending", function() { this.reporter.reportSpecResults(); return expect(this.trackSpy).toHaveBeenCalled(); }); }); describe("skipped tests", function() { beforeEach(function() { this.reportSuitesSpy = spyOn(this.reporter, "reportSuites"); this.logSpy = spyOn(this.reporter, "log"); return this.spec.result = function() { return { status: "pending", skipped: true }; }; }); return it("doesn't report the suite or log the results", function() { this.reporter.reportSpecResults(); expect(this.reportSuitesSpy).not.toHaveBeenCalled(); return expect(this.logSpy).not.toHaveBeenCalled(); }); }); return describe("failing tests", function() { beforeEach(function() { this.trackSpy = spyOn(this.reporter, "trackFailure"); return this.spec.result = function() { return { status: "failed", skipped: false }; }; }); return it("tracks the failure", function() { this.reporter.reportSpecResults(); return expect(this.trackSpy).toHaveBeenCalled(); }); }); }); describe("#trackPending", function() { beforeEach(function() { this.reporter.spec = this.spec; return this.spec.result = function() { return { status: "pending", skipped: false }; }; }); return it("logs the status as 'pending'", function() { var spy; spy = spyOn(this.reporter, "log"); this.reporter.trackPending(); return expect(spy).toHaveBeenCalledWith({ type: "spec", suite: "_suite_name_", label: "_spec_name_", status: "pending", skipped: false }); }); }); describe("#trackFailure", function() { beforeEach(function() { this.reporter.spec = this.spec; return this.spec.result = function() { return { status: "failed", skipped: false }; }; }); return it("logs the status as 'failed'", function() { var spy; spy = spyOn(this.reporter, "log"); this.reporter.trackFailure(); return expect(spy).toHaveBeenCalledWith({ type: "spec", suite: "_suite_name_", label: "_spec_name_", status: "failed", skipped: false, link: "_spec_description_", message: "_message_", trace: "_message_" }); }); }); describe("#reportRunnerResults", function() { it("logs the results", function() { var args, spy; spy = spyOn(this.reporter, "log"); window.__coverage__ || (window.__coverage__ = {}); this.reporter.reportRunnerResults(); Teaspoon.finished = false; args = spy.mostRecentCall.args[0]; expect(args["type"]).toEqual("result"); expect(args["elapsed"]).toBeDefined(); return expect(args["coverage"]).toBe(window.__coverage__); }); return it("tells Teaspoon that we're finished", function() { this.reporter.reportRunnerResults(); expect(Teaspoon.finished).toEqual(true); return Teaspoon.finished = false; }); }); return describe("#log", function() { return it("logs the JSON of the object passed (with an additional _teaspoon property)", function() { this.reporter.log({ foo: true }); return expect(this.logSpy).toHaveBeenCalledWith('{"foo":true,"_teaspoon":true}'); }); }); }); }).call(this); ;TI"dependency_digest;F"%83ea67cf6991c287552206d89cb78003I"required_paths;F[I"d/Users/jejacks0n/Projects/teaspoon/spec/javascripts/teaspoon/base/reporters/console_spec.coffee;FI"dependency_paths;F[{I" path;FI"d/Users/jejacks0n/Projects/teaspoon/spec/javascripts/teaspoon/base/reporters/console_spec.coffee;FI" mtime;FI"2013-06-16T11:48:01-06:00;FI" digest;F"%d4c672392921c7b1b8b0a6f223ee6fa8I" _version;F"%6776f581a4329e299531e1d52aa59832