o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1356385914.393698: @value"='{I" class:EFI"BundledAsset;FI"logical_path;FI"teabag/base/models_spec.js;FI" pathname;FI"U/Users/jejacks0n/Projects/teabag/spec/javascripts/teabag/base/models_spec.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2012-12-23T15:51:20-07:00;FI" length;Fi]%I" digest;F"%3896301b10130811f0176fead9c2ea6eI" source;FI"]%(function() { describe("Teabag.Spec", function() { beforeEach(function() { var _this = this; this.jasmineSuite = { getFullName: function() { return "_full jasmine name_"; } }; this.jasmineSpecResultsItems = [ { message: "_jasmine_message1_", trace: { stack: "_jasmine_stack_trace1_" }, passed: function() { return false; } }, { message: "_jasmine_message2_", trace: { stack: "_jasmine_stack_trace2_" }, passed: function() { return false; } } ]; this.jasmineSpecResults = { skipped: false, passed: function() { return true; }, getItems: function() { return _this.jasmineSpecResultsItems; } }; this.jasmineSpec = { description: "_jasmine_description_", viewId: 42, pending: false, suite: this.jasmineSuite, getFullName: function() { return "_full jasmine description_"; }, results: function() { return _this.jasmineSpecResults; } }; this.mochaSuite = { fullTitle: function() { return "_full mocha name_"; } }; return this.mochaSpec = { title: "_mocha_description_", parent: this.mochaSuite, viewId: 420, pending: false, state: "passed", err: { message: "_mocha_message_", stack: "_mocha_stack_trace_" }, fullTitle: function() { return "_full mocha description_"; } }; }); describe("constructor", function() { describe("with jasmine type spec", function() { return it("has the expected properties", function() { var spec; spec = new Teabag.Spec(this.jasmineSpec); expect(spec.fullDescription).toEqual("_full jasmine description_"); expect(spec.description).toEqual("_jasmine_description_"); expect(spec.link).toEqual("?grep=_full%20jasmine%20description_"); expect(spec.parent).toBe(this.jasmineSuite); expect(spec.suiteName).toBe("_full jasmine name_"); expect(spec.viewId).toBe(42); return expect(spec.pending).toBe(false); }); }); return describe("with mocha type spec", function() { return it("has the expected properties", function() { var spec; spec = new Teabag.Spec(this.mochaSpec); expect(spec.fullDescription).toEqual("_full mocha description_"); expect(spec.description).toEqual("_mocha_description_"); expect(spec.link).toEqual("?grep=_full%20mocha%20description_"); expect(spec.parent).toBe(this.mochaSuite); expect(spec.suiteName).toBe("_full mocha name_"); expect(spec.viewId).toBe(420); return expect(spec.pending).toBe(false); }); }); }); describe("#errors", function() { describe("with jasmine type spec", function() { return it("returns the expected object", function() { var spec; spec = new Teabag.Spec(this.jasmineSpec); expect(spec.errors()).toEqual([ { message: "_jasmine_message1_", stack: "_jasmine_stack_trace1_" }, { message: "_jasmine_message2_", stack: "_jasmine_stack_trace2_" } ]); spyOn(this.jasmineSpecResultsItems[0], "passed").andReturn(true); spec = new Teabag.Spec(this.jasmineSpec); return expect(spec.errors()).toEqual([ { message: "_jasmine_message2_", stack: "_jasmine_stack_trace2_" } ]); }); }); return describe("with mocha type spec", function() { return it("returns the expected object", function() { var spec; spec = new Teabag.Spec(this.mochaSpec); return expect(spec.errors()).toEqual([ { message: "_mocha_message_", stack: "_mocha_stack_trace_" } ]); }); }); }); describe("#getParents", function() { return it("gets the parent suites", function() { var spec; spec = new Teabag.Spec(this.jasmineSpec); return expect(spec.getParents()[0].fullDescription).toEqual("_full jasmine name_"); }); }); return describe("#result", function() { describe("with jasmine type spec", function() { describe("passing", function() { return it("returns the expected object", function() { var spec; spec = new Teabag.Spec(this.jasmineSpec); return expect(spec.result()).toEqual({ status: "passed", skipped: false }); }); }); describe("skipped", function() { return it("returns the expected object", function() { var spec; this.jasmineSpecResults.skipped = true; spec = new Teabag.Spec(this.jasmineSpec); return expect(spec.result()).toEqual({ status: "passed", skipped: true }); }); }); describe("pending", function() { return it("returns the expected object", function() { var spec; this.jasmineSpec.pending = true; spec = new Teabag.Spec(this.jasmineSpec); return expect(spec.result()).toEqual({ status: "pending", skipped: false }); }); }); return describe("failing", function() { return it("returns the expected object", function() { var spec; spyOn(this.jasmineSpecResults, "passed").andReturn(false); spec = new Teabag.Spec(this.jasmineSpec); return expect(spec.result()).toEqual({ status: "failed", skipped: false }); }); }); }); return describe("with mocha type spec", function() { describe("passing", function() { return it("returns the expected object", function() { var spec; spec = new Teabag.Spec(this.mochaSpec); return expect(spec.result()).toEqual({ status: "passed", skipped: false }); }); }); describe("skipped", function() { return it("returns the expected object", function() { var spec; this.mochaSpec.state = "skipped"; spec = new Teabag.Spec(this.mochaSpec); return expect(spec.result()).toEqual({ status: "passed", skipped: true }); }); }); describe("pending", function() { return it("returns the expected object", function() { var spec; this.mochaSpec.pending = true; spec = new Teabag.Spec(this.mochaSpec); return expect(spec.result()).toEqual({ status: "pending", skipped: false }); }); }); return describe("failing", function() { return it("returns the expected object", function() { var spec; this.mochaSpec.state = "failed"; spec = new Teabag.Spec(this.mochaSpec); return expect(spec.result()).toEqual({ status: "failed", skipped: false }); }); }); }); }); }); describe("Teabag.Suite", function() { beforeEach(function() { this.jasmineParentSuite = {}; this.jasmineSuite = { description: "_jasmine_description_", parentSuite: this.jasmineParentSuite, viewId: 42, getFullName: function() { return "_full jasmine description_"; } }; this.mochaParentSuite = { root: false }; return this.mochaSuite = { fullTitle: function() { return "_full mocha description_"; }, title: "_mocha_description_", viewId: 420, parent: this.mochaParentSuite }; }); return describe("constructor", function() { describe("with jasmine type suite", function() { return it("has the expected properties", function() { var suite; suite = new Teabag.Suite(this.jasmineSuite); expect(suite.fullDescription).toEqual("_full jasmine description_"); expect(suite.description).toEqual("_jasmine_description_"); expect(suite.link).toEqual("?grep=_full%20jasmine%20description_"); expect(suite.parent).toBe(this.jasmineParentSuite); return expect(suite.viewId).toBe(42); }); }); return describe("with mocha type suite", function() { return it("has the expected properties", function() { var suite; suite = new Teabag.Suite(this.mochaSuite); expect(suite.fullDescription).toEqual("_full mocha description_"); expect(suite.description).toEqual("_mocha_description_"); expect(suite.link).toEqual("?grep=_full%20mocha%20description_"); expect(suite.parent).toBe(this.mochaParentSuite); return expect(suite.viewId).toBe(420); }); }); }); }); }).call(this); ;FI"required_assets_digest;F"%7797f81b0a8837869f074471e552a18fI" _version;F"%6776f581a4329e299531e1d52aa59832