o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1354943153.5425642: @value"\%{I" class:EFI"BundledAsset;FI"logical_path;FI"%teabag/reporters/jasmine/test.js;FI" pathname;FI"a/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/reporters/jasmine/test.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2012-12-07T22:05:36-07:00;FI" length;Fij#I" digest;F"%cae6597e9010cda3f498deb8b3455795I" source;FI"j#(function() { Teabag.Reporters.HTML = (function() { function HTML() { console.debug(arguments); } return HTML; })(); Teabag.HtmlReporter.ReporterView = (function() { function ReporterView(dom) { this.dom = dom; this.startedAt = new Date(); this.runningSpecCount = 0; this.completeSpecCount = 0; this.passedCount = 0; this.failedCount = 0; this.skippedCount = 0; } ReporterView.prototype.createResultsMenu = function() { var _this = this; this.resultsMenu = this.el('span', { className: 'resultsMenu bar' }, this.summaryMenuItem = this.el('a', { className: 'summaryMenuItem', href: "#" }, '0 specs'), ' | ', this.detailsMenuItem = this.el('a', { className: 'detailsMenuItem', href: "#" }, '0 failing')); this.summaryMenuItem.onclick = function() { return _this.dom.reporter.className = _this.dom.reporter.className.replace(/\s?showDetails/g, ''); }; return this.detailsMenuItem.onclick = function() { return _this.showDetails(); }; }; ReporterView.prototype.showDetails = function() { if (this.dom.reporter.className.search(/showDetails/) === -1) { return this.dom.reporter.className += " showDetails"; } }; ReporterView.prototype.addSpecs = function(specs, specFilter) { var spec, _i, _len, _results; this.totalSpecCount = specs.length; this.views = { specs: {}, suites: {} }; _results = []; for (_i = 0, _len = specs.length; _i < _len; _i++) { spec = specs[_i]; this.views.specs[spec.id] = new Teabag.HtmlReporter.SpecView(spec, this.dom, this.views); if (specFilter(spec)) { _results.push(this.runningSpecCount += 1); } else { _results.push(void 0); } } return _results; }; ReporterView.prototype.specComplete = function(spec) { var specView, _base, _name; this.completeSpecCount += 1; specView = ((_base = this.views.specs)[_name = spec.id] || (_base[_name] = new Teabag.HtmlReporter.SpecView(spec, this.dom, this.views))); switch (specView.status()) { case 'passed': this.passedCount += 1; break; case 'skipped': this.skippedCount += 1; break; default: this.failedCount += 1; } specView.refresh(); return this.refresh(); }; ReporterView.prototype.suiteComplete = function(suite) { var _ref; return (_ref = this.views.suites[suite.id]) != null ? _ref.refresh() : void 0; }; ReporterView.prototype.refresh = function() { if (typeof this.resultsMenu === 'undefined') { this.createResultsMenu(); } if (!this.runningAlert) { this.runningAlert = this.el('a', { href: Teabag.HtmlReporter.sectionLink(), className: "runningAlert bar" }); this.dom.alert.appendChild(this.runningAlert); } this.runningAlert.innerHTML = "Running " + this.completeSpecCount + " of " + (this.specPluralizedFor(this.totalSpecCount)); if (typeof this.skippedAlert === 'undefined') { this.skippedAlert = this.el('a', { href: Teabag.HtmlReporter.sectionLink(), className: "skippedAlert bar" }); } this.skippedAlert.innerHTML = "Skipping " + this.skippedCount + " of " + (this.specPluralizedFor(this.totalSpecCount)) + " - run all"; if (this.skippedCount === 1 && this.dom.alert) { this.dom.alert.appendChild(this.skippedAlert); } if (!this.passedAlert) { this.passedAlert = this.el('span', { href: Teabag.HtmlReporter.sectionLink(), className: "passingAlert bar" }); } this.passedAlert.innerHTML = "Passing " + (this.specPluralizedFor(this.passedCount)); if (!this.failedAlert) { this.failedAlert = this.el('span', { href: "?", className: "failingAlert bar" }); } this.failedAlert.innerHTML = "Failing " + (this.specPluralizedFor(this.failedCount)); if (this.failedCount === 1 && this.dom.alert) { this.dom.alert.appendChild(this.failedAlert); this.dom.alert.appendChild(this.resultsMenu); } this.summaryMenuItem.innerHTML = this.specPluralizedFor(this.runningSpecCount); return this.detailsMenuItem.innerHTML = "" + this.failedCount + " failing"; }; ReporterView.prototype.complete = function() { this.dom.alert.removeChild(this.runningAlert); this.skippedAlert.innerHTML = "Ran " + this.runningSpecCount + " of " + (this.specPluralizedFor(this.totalSpecCount)) + " - run all"; if (this.failedCount === 0) { this.dom.alert.appendChild(this.el('span', { className: 'passingAlert bar' }, "Passing " + (this.specPluralizedFor(this.passedCount)))); } else { this.showDetails(); } return this.dom.banner.appendChild(this.el('span', { className: 'duration' }, "finished in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s")); }; ReporterView.prototype.specPluralizedFor = function(count) { return "" + count + " spec" + (count > 1 ? 's' : ''); }; return ReporterView; })(); Teabag.HtmlReporter.SuiteView = (function() { function SuiteView(suite, dom, views) { this.suite = suite; this.dom = dom; this.views = views; this.build(); this.appendToSummary(this.suite, this.element); } SuiteView.prototype.build = function() { return this.element = this.el('div', { className: 'suite' }, this.el('a', { className: 'description', href: Teabag.HtmlReporter.sectionLink(this.suite.getFullName()) }, this.suite.description)); }; SuiteView.prototype.status = function() { return this.getSpecStatus(this.suite); }; SuiteView.prototype.refresh = function() { return this.element.className += " " + (this.status()); }; return SuiteView; })(); Teabag.HtmlReporter.SpecView = (function() { function SpecView(spec, dom, views) { this.spec = spec; this.dom = dom; this.views = views; this.build(); } SpecView.prototype.build = function() { this.symbol = this.el('li', { className: 'pending' }); this.summary = this.el('div', { className: 'specSummary' }, this.el('a', { className: 'description', href: Teabag.HtmlReporter.sectionLink(this.spec.getFullName()), title: this.spec.getFullName() }, this.spec.description)); this.detail = this.el('div', { className: 'specDetail' }, this.el('a', { className: 'description', href: '?spec=' + encodeURIComponent(this.spec.getFullName()), title: this.spec.getFullName() }, this.spec.getFullName())); return this.dom.symbolSummary.appendChild(this.symbol); }; SpecView.prototype.status = function() { return this.getSpecStatus(this.spec); }; SpecView.prototype.refresh = function() { this.symbol.className = this.status(); switch (this.status()) { case 'passed': return this.appendSummaryToSuiteDiv(); case 'failed': this.appendSummaryToSuiteDiv(); return this.appendFailureDetail(); } }; SpecView.prototype.appendSummaryToSuiteDiv = function() { this.summary.className += " " + (this.status()); return this.appendToSummary(this.spec, this.summary); }; SpecView.prototype.appendFailureDetail = function() { var messagesDiv, result, _i, _len, _ref; this.detail.className += " " + (this.status()); messagesDiv = this.el('div', { className: 'messages' }); _ref = this.spec.results().getItems(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { result = _ref[_i]; if (result.type === 'log') { messagesDiv.appendChild(this.el('div', { className: 'resultMessage log' }, result.toString())); } else if (result.type === 'expect' && result.passed && !result.passed()) { messagesDiv.appendChild(this.el('div', { className: 'resultMessage fail' }, result.message)); } if (result.trace.stack) { messagesDiv.appendChild(this.el('div', { className: 'stackTrace' }, result.trace.stack)); } } if (messagesDiv.childNodes.length > 0) { this.detail.appendChild(messagesDiv); return this.dom.details.appendChild(this.detail); } }; return SpecView; })(); Teabag.HtmlReporterHelpers.addHelpers(Teabag.HtmlReporter.ReporterView); Teabag.HtmlReporterHelpers.addHelpers(Teabag.HtmlReporter.SuiteView); Teabag.HtmlReporterHelpers.addHelpers(Teabag.HtmlReporter.SpecView); }).call(this); ;FI"required_assets_digest;F"%33605466f7c43920e5ee26279427b321I" _version;F"%6776f581a4329e299531e1d52aa59832