o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1354777403.5804522: @value"Ž?{I" class:EFI"ProcessedAsset;FI"logical_path;FI"%teabag-reporters/jasmine-html.js;FI" pathname;FI"a/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag-reporters/jasmine-html.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2012-12-06T00:03:18-07:00;FI" length;FiA> Jasmine Running " + spec.suite.description + " " + spec.description + "..."); } }; self.reportSpecResults = function(spec) { return reporterView.specComplete(spec); }; self.log = function() { var console; console = jasmine.getGlobal().console; if (console && console.log) { if (console.log.apply) { return console.log.apply(console, arguments_); } else { return console.log(arguments_); } } }; self.specFilter = function(spec) { if (!focusedSpecName()) { return true; } return spec.getFullName().indexOf(focusedSpecName()) === 0; }; return self; }; Teabag.HtmlReporter.parameters = function(doc) { var paramStr, params; paramStr = doc.location.search.substring(1); params = []; if (paramStr.length > 0) { params = paramStr.split("&"); } return params; }; Teabag.HtmlReporter.sectionLink = function(sectionName) { var link, params; link = "?"; params = []; if (sectionName) { params.push("spec=" + encodeURIComponent(sectionName)); } if (!jasmine.CATCH_EXCEPTIONS) { params.push("catch=false"); } if (params.length > 0) { link += params.join("&"); } return link; }; Teabag.HtmlReporterHelpers.addHelpers(Teabag.HtmlReporter); Teabag.HtmlReporter.ReporterView = function(dom) { var isDefined, isUndefined, showDetails, specPluralizedFor; showDetails = function() { if (dom.reporter.className.search(/showDetails/) === -1) { return dom.reporter.className += " showDetails"; } }; isUndefined = function(obj) { return typeof obj === "undefined"; }; isDefined = function(obj) { return !isUndefined(obj); }; specPluralizedFor = function(count) { var str; str = count + " spec"; if (count > 1) { str += "s"; } return str; }; this.startedAt = new Date(); this.runningSpecCount = 0; this.completeSpecCount = 0; this.passedCount = 0; this.failedCount = 0; this.skippedCount = 0; this.createResultsMenu = function() { this.resultsMenu = this.createDom("span", { className: "resultsMenu bar" }, this.summaryMenuItem = this.createDom("a", { className: "summaryMenuItem", href: "#" }, "0 specs"), " | ", this.detailsMenuItem = this.createDom("a", { className: "detailsMenuItem", href: "#" }, "0 failing")); this.summaryMenuItem.onclick = function() { return dom.reporter.className = dom.reporter.className.replace(RegExp(" showDetails", "g"), ""); }; return this.detailsMenuItem.onclick = function() { return showDetails(); }; }; this.addSpecs = function(specs, specFilter) { var i, spec, _results; this.totalSpecCount = specs.length; this.views = { specs: {}, suites: {} }; i = 0; _results = []; while (i < specs.length) { spec = specs[i]; this.views.specs[spec.id] = new Teabag.HtmlReporter.SpecView(spec, dom, this.views); if (specFilter(spec)) { this.runningSpecCount++; } _results.push(i++); } return _results; }; this.specComplete = function(spec) { var specView; this.completeSpecCount++; if (isUndefined(this.views.specs[spec.id])) { this.views.specs[spec.id] = new Teabag.HtmlReporter.SpecView(spec, dom); } specView = this.views.specs[spec.id]; switch (specView.status()) { case "passed": this.passedCount++; break; case "failed": this.failedCount++; break; case "skipped": this.skippedCount++; } specView.refresh(); return this.refresh(); }; this.suiteComplete = function(suite) { var suiteView; suiteView = this.views.suites[suite.id]; if (isUndefined(suiteView)) { return; } return suiteView.refresh(); }; this.refresh = function() { if (isUndefined(this.resultsMenu)) { this.createResultsMenu(); } if (isUndefined(this.runningAlert)) { this.runningAlert = this.createDom("a", { href: Teabag.HtmlReporter.sectionLink(), className: "runningAlert bar" }); dom.alert.appendChild(this.runningAlert); } this.runningAlert.innerHTML = "Running " + this.completeSpecCount + " of " + specPluralizedFor(this.totalSpecCount); if (isUndefined(this.skippedAlert)) { this.skippedAlert = this.createDom("a", { href: Teabag.HtmlReporter.sectionLink(), className: "skippedAlert bar" }); } this.skippedAlert.innerHTML = "Skipping " + this.skippedCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all"; if (this.skippedCount === 1 && isDefined(dom.alert)) { dom.alert.appendChild(this.skippedAlert); } if (isUndefined(this.passedAlert)) { this.passedAlert = this.createDom("span", { href: Teabag.HtmlReporter.sectionLink(), className: "passingAlert bar" }); } this.passedAlert.innerHTML = "Passing " + specPluralizedFor(this.passedCount); if (isUndefined(this.failedAlert)) { this.failedAlert = this.createDom("span", { href: "?", className: "failingAlert bar" }); } this.failedAlert.innerHTML = "Failing " + specPluralizedFor(this.failedCount); if (this.failedCount === 1 && isDefined(dom.alert)) { dom.alert.appendChild(this.failedAlert); dom.alert.appendChild(this.resultsMenu); } this.summaryMenuItem.innerHTML = "" + specPluralizedFor(this.runningSpecCount); return this.detailsMenuItem.innerHTML = "" + this.failedCount + " failing"; }; this.complete = function() { dom.alert.removeChild(this.runningAlert); this.skippedAlert.innerHTML = "Ran " + this.runningSpecCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all"; if (this.failedCount === 0) { dom.alert.appendChild(this.createDom("span", { className: "passingAlert bar" }, "Passing " + specPluralizedFor(this.passedCount))); } else { showDetails(); } return dom.banner.appendChild(this.createDom("span", { className: "duration" }, "finished in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s")); }; return this; }; Teabag.HtmlReporterHelpers.addHelpers(Teabag.HtmlReporter.ReporterView); Teabag.HtmlReporter.SpecView = function(spec, dom, views) { this.spec = spec; this.dom = dom; this.views = views; this.symbol = this.createDom("li", { className: "pending" }); this.dom.symbolSummary.appendChild(this.symbol); this.summary = this.createDom("div", { className: "specSummary" }, this.createDom("a", { className: "description", href: Teabag.HtmlReporter.sectionLink(this.spec.getFullName()), title: this.spec.getFullName() }, this.spec.description)); return this.detail = this.createDom("div", { className: "specDetail" }, this.createDom("a", { className: "description", href: "?spec=" + encodeURIComponent(this.spec.getFullName()), title: this.spec.getFullName() }, this.spec.getFullName())); }; Teabag.HtmlReporter.SpecView.prototype.status = function() { return this.getSpecStatus(this.spec); }; Teabag.HtmlReporter.SpecView.prototype.refresh = function() { this.symbol.className = this.status(); switch (this.status()) { case "skipped": case "passed": return this.appendSummaryToSuiteDiv(); case "failed": this.appendSummaryToSuiteDiv(); return this.appendFailureDetail(); } }; Teabag.HtmlReporter.SpecView.prototype.appendSummaryToSuiteDiv = function() { this.summary.className += " " + this.status(); return this.appendToSummary(this.spec, this.summary); }; Teabag.HtmlReporter.SpecView.prototype.appendFailureDetail = function() { var i, messagesDiv, result, resultItems; this.detail.className += " " + this.status(); resultItems = this.spec.results().getItems(); messagesDiv = this.createDom("div", { className: "messages" }); i = 0; while (i < resultItems.length) { result = resultItems[i]; if (result.type === "log") { messagesDiv.appendChild(this.createDom("div", { className: "resultMessage log" }, result.toString())); } else if (result.type === "expect" && result.passed && !result.passed()) { messagesDiv.appendChild(this.createDom("div", { className: "resultMessage fail" }, result.message)); if (result.trace.stack) { messagesDiv.appendChild(this.createDom("div", { className: "stackTrace" }, result.trace.stack)); } } i++; } if (messagesDiv.childNodes.length > 0) { this.detail.appendChild(messagesDiv); return this.dom.details.appendChild(this.detail); } }; Teabag.HtmlReporterHelpers.addHelpers(Teabag.HtmlReporter.SpecView); Teabag.HtmlReporter.SuiteView = function(suite, dom, views) { this.suite = suite; this.dom = dom; this.views = views; this.element = this.createDom("div", { className: "suite" }, this.createDom("a", { className: "description", href: Teabag.HtmlReporter.sectionLink(this.suite.getFullName()) }, this.suite.description)); return this.appendToSummary(this.suite, this.element); }; Teabag.HtmlReporter.SuiteView.prototype.status = function() { return this.getSpecStatus(this.suite); }; Teabag.HtmlReporter.SuiteView.prototype.refresh = function() { return this.element.className += " " + this.status(); }; Teabag.HtmlReporterHelpers.addHelpers(Teabag.HtmlReporter.SuiteView); }).call(this); ;TI"dependency_digest;F"%ecbce883cd198376b00501021276c5f6I"required_paths;F[I"a/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag-reporters/jasmine-html.coffee;FI"dependency_paths;F[{I" path;FI"a/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag-reporters/jasmine-html.coffee;FI" mtime;FI"2012-12-06T00:03:18-07:00;FI" digest;F"%175cb16528fcc717ecfeebfa95802c43I" _version;F"%6776f581a4329e299531e1d52aa59832