spec/dummy/tmp/cache/assets/C59/250/sprockets%2Fa80d3fe493d2476e58c4323996064512 in teabag-0.3.5 vs spec/dummy/tmp/cache/assets/C59/250/sprockets%2Fa80d3fe493d2476e58c4323996064512 in teabag-0.3.6
- old
+ new
@@ -1,8 +1,8 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1356059376.5399559:@value"4f{I"
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1356390636.46769:@value"\`{I"
class:EFI"BundledAsset; FI"logical_path; FI"teabag/base/teabag.js; FI"
pathname; FI"V/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/teabag.coffee; FI"content_type; FI"application/javascript; FI"
-mtime; FI"2012-12-20T18:59:53-07:00; FI"length; FiXdI"digest; F"%26e4d31997cc94f58edcd2fc7f8550d1I"source; FI"Xd(function() {
+mtime; FI"2012-12-24T16:10:29-07:00; FI"length; Fi€^I"digest; F"%413467997062f8e9050afed6419aa952I"source; FI"€^(function() {
this.Teabag = (function() {
function Teabag() {}
@@ -20,18 +20,33 @@
Teabag.location = window.location;
Teabag.console = window.console;
+ Teabag.messages = [];
+
Teabag.execute = function() {
if (this.defer) {
this.defer = false;
return;
}
return new Teabag.Runner();
};
+ Teabag.log = function() {
+ var _ref;
+ this.messages.push(arguments[0]);
+ return (_ref = this.console).log.apply(_ref, arguments);
+ };
+
+ Teabag.getMessages = function() {
+ var messages;
+ messages = this.messages;
+ this.messages = [];
+ return messages;
+ };
+
return Teabag;
})();
}).call(this);
@@ -61,112 +76,31 @@
params[decodeURIComponent(name)] = decodeURIComponent(value);
}
return params;
};
- Runner.prototype.setup = function() {};
-
- return Runner;
-
- })();
-
-}).call(this);
-(function() {
-
- Teabag.Reporters.NormalizedSpec = (function() {
-
- function NormalizedSpec(spec) {
- var _base, _base1;
- this.spec = spec;
- this.fullDescription = (typeof (_base = this.spec).getFullName === "function" ? _base.getFullName() : void 0) || this.spec.fullTitle();
- this.description || (this.description = this.spec.description || this.spec.title);
- this.link = "?grep=" + (encodeURIComponent(this.fullDescription));
- this.parent = this.spec.suite || this.spec.parent;
- this.suiteName = (typeof (_base1 = this.parent).getFullName === "function" ? _base1.getFullName() : void 0) || this.parent.fullTitle();
- this.viewId = this.spec.viewId;
- this.pending = this.spec.pending;
- }
-
- NormalizedSpec.prototype.errors = function() {
- var item, _i, _len, _ref, _results;
- if (this.spec.err) {
- return [this.spec.err];
- }
- if (!this.spec.results) {
- return [];
- }
- _ref = this.spec.results().getItems();
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- item = _ref[_i];
- if (item.passed()) {
- continue;
- }
- _results.push({
- message: item.message,
- stack: item.trace.stack
- });
- }
- return _results;
- };
-
- NormalizedSpec.prototype.result = function() {
- var results, skipped, status;
- status = "failed";
- if (this.spec.results) {
- results = this.spec.results();
- if (results.passed()) {
- status = "passed";
- }
- skipped = results.skipped;
+ Runner.prototype.getReporter = function() {
+ if (this.params["reporter"]) {
+ return Teabag.Reporters[this.params["reporter"]];
} else {
- if (this.spec.state === "passed" || this.spec.state === "skipped") {
- status = "passed";
- }
- skipped = this.spec.state === "skipped";
- }
- if (this.spec.pending) {
- status = "pending";
- }
- return {
- status: status,
- skipped: skipped
- };
- };
-
- return NormalizedSpec;
-
- })();
-
- Teabag.Reporters.NormalizedSuite = (function() {
-
- function NormalizedSuite(suite) {
- var _base;
- this.suite = suite;
- this.fullDescription = (typeof (_base = this.suite).getFullName === "function" ? _base.getFullName() : void 0) || this.suite.fullTitle();
- this.description = this.suite.description || this.suite.title;
- this.link = "?grep=" + (encodeURIComponent(this.fullDescription));
- this.parent = this.getParent();
- this.viewId = this.suite.viewId;
- }
-
- NormalizedSuite.prototype.getParent = function() {
- if (this.suite.parent) {
- if (this.suite.parent.root) {
- return null;
+ if (window.navigator.userAgent.match(/PhantomJS/)) {
+ return Teabag.Reporters.Console;
} else {
- return this.suite.parent;
+ return Teabag.Reporters.HTML;
}
- } else {
- return this.suite.parentSuite;
}
};
- return NormalizedSuite;
+ Runner.prototype.setup = function() {};
+ return Runner;
+
})();
+}).call(this);
+(function() {
+
Teabag.Reporters.BaseView = (function() {
function BaseView() {
this.elements = {};
this.build();
@@ -201,11 +135,11 @@
};
BaseView.prototype.setText = function(id, value) {
var el;
el = this.findEl(id);
- return el.innerText = value;
+ return el.innerHTML = value;
};
BaseView.prototype.setHtml = function(id, value, add) {
var el;
if (add == null) {
@@ -236,97 +170,10 @@
})();
}).call(this);
(function() {
- var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
-
- Teabag.Reporters.Console = (function() {
-
- function Console() {
- this.reportRunnerResults = __bind(this.reportRunnerResults, this);
- this.start = new Teabag.Date().getTime();
- }
-
- Console.prototype.reportSpecResults = function(spec) {
- var result;
- this.spec = new Teabag.Reporters.NormalizedSpec(spec);
- result = this.spec.result();
- switch (result.status) {
- case "pending":
- return this.trackPending();
- case "failed":
- return this.trackFailure();
- default:
- return this.log({
- type: "spec",
- suite: this.spec.suiteName,
- spec: this.spec.description,
- status: result.status,
- skipped: result.skipped,
- full_description: this.spec.fullDescription
- });
- }
- };
-
- Console.prototype.trackPending = function() {
- var result;
- result = this.spec.result();
- return this.log({
- type: "spec",
- suite: this.spec.suiteName,
- spec: this.spec.description,
- status: result.status,
- skipped: result.skipped,
- full_description: this.spec.fullDescription
- });
- };
-
- Console.prototype.trackFailure = function() {
- var error, result, _i, _len, _ref, _results;
- result = this.spec.result();
- _ref = this.spec.errors();
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- error = _ref[_i];
- _results.push(this.log({
- type: "spec",
- suite: this.spec.suiteName,
- spec: this.spec.description,
- status: result.status,
- skipped: result.skipped,
- full_description: this.spec.fullDescription,
- link: this.spec.link,
- message: error.message,
- trace: error.stack || error.message || "Stack Trace Unavailable"
- }));
- }
- return _results;
- };
-
- Console.prototype.reportRunnerResults = function() {
- this.log({
- type: "results",
- elapsed: ((new Teabag.Date().getTime() - this.start) / 1000).toFixed(5)
- });
- return Teabag.finished = true;
- };
-
- Console.prototype.log = function(obj) {
- if (obj == null) {
- obj = {};
- }
- obj["_teabag"] = true;
- return Teabag.console.log(JSON.stringify(obj));
- };
-
- return Console;
-
- })();
-
-}).call(this);
-(function() {
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Teabag.Reporters.HTML = (function(_super) {
@@ -387,11 +234,11 @@
return this.setText("stats-duration", "...");
}
};
HTML.prototype.reportSpecStarting = function(spec) {
- spec = new Teabag.Reporters.NormalizedSpec(spec);
+ spec = new Teabag.Spec(spec);
if (this.config["build-full-report"]) {
this.reportView = new Teabag.Reporters.HTML.SpecView(spec, this);
}
return this.specStart = new Teabag.Date().getTime();
};
@@ -431,11 +278,11 @@
return this.setText("stats-" + name, value);
};
HTML.prototype.updateStatus = function(spec) {
var elapsed, result, _ref, _ref1;
- spec = new Teabag.Reporters.NormalizedSpec(spec);
+ spec = new Teabag.Spec(spec);
result = spec.result();
if (result.skipped || result.status === "pending") {
this.updateStat("skipped", this.total.skipped += 1);
return;
}
@@ -515,11 +362,11 @@
match = document.cookie.match(new RegExp("(?:^|;)\\s?" + name + "=(.*?)(?:;|$)", "i"));
return match && JSON.parse(unescape(match[1]).split(" ")[0]);
} else {
date = new Teabag.Date();
date.setDate(date.getDate() + 365);
- return document.cookie = "" + name + "=" + (escape(JSON.stringify(value))) + "; path=/; expires=" + (date.toUTCString()) + ";";
+ return document.cookie = "" + name + "=" + (escape(JSON.stringify(value))) + "; path=\"/\"; expires=" + (date.toUTCString()) + ";";
}
};
return HTML;
@@ -757,11 +604,11 @@
this.suite = suite;
this.reporter = reporter;
this.views = this.reporter.views;
this.suite.viewId = viewId += 1;
this.views.suites[this.suite.viewId] = this;
- this.suite = new Teabag.Reporters.NormalizedSuite(suite);
+ this.suite = new Teabag.Suite(suite);
SuiteView.__super__.constructor.apply(this, arguments);
}
SuiteView.prototype.build = function() {
SuiteView.__super__.build.call(this, "suite");
@@ -806,6 +653,119 @@
return SuiteView;
})(Teabag.Reporters.BaseView);
}).call(this);
-; FI"required_assets_digest; F"%4cfa420a62d4a43938befeb49df9e3c0I"
_version; F"%6776f581a4329e299531e1d52aa59832
+(function() {
+ var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
+
+ Teabag.Reporters.Console = (function() {
+
+ function Console() {
+ this.reportRunnerResults = __bind(this.reportRunnerResults, this);
+ this.start = new Teabag.Date();
+ this.suites = {};
+ }
+
+ Console.prototype.reportRunnerStarting = function(runner) {
+ return this.log({
+ type: "runner",
+ total: runner.total || runner.specs().length,
+ start: JSON.parse(JSON.stringify(this.start))
+ });
+ };
+
+ Console.prototype.reportSuites = function() {
+ var index, suite, _i, _len, _ref, _results;
+ _ref = this.spec.getParents();
+ _results = [];
+ for (index = _i = 0, _len = _ref.length; _i < _len; index = ++_i) {
+ suite = _ref[index];
+ if (this.suites[suite.fullDescription]) {
+ continue;
+ }
+ this.suites[suite.fullDescription] = true;
+ _results.push(this.log({
+ type: "suite",
+ label: suite.description,
+ level: index
+ }));
+ }
+ return _results;
+ };
+
+ Console.prototype.reportSpecResults = function(spec) {
+ var result;
+ this.spec = new Teabag.Spec(spec);
+ result = this.spec.result();
+ this.reportSuites();
+ switch (result.status) {
+ case "pending":
+ return this.trackPending();
+ case "failed":
+ return this.trackFailure();
+ default:
+ return this.log({
+ type: "spec",
+ suite: this.spec.suiteName,
+ label: this.spec.description,
+ status: result.status,
+ skipped: result.skipped
+ });
+ }
+ };
+
+ Console.prototype.trackPending = function() {
+ var result;
+ result = this.spec.result();
+ return this.log({
+ type: "spec",
+ suite: this.spec.suiteName,
+ label: this.spec.description,
+ status: result.status,
+ skipped: result.skipped
+ });
+ };
+
+ Console.prototype.trackFailure = function() {
+ var error, result, _i, _len, _ref, _results;
+ result = this.spec.result();
+ _ref = this.spec.errors();
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ error = _ref[_i];
+ _results.push(this.log({
+ type: "spec",
+ suite: this.spec.suiteName,
+ label: this.spec.description,
+ status: result.status,
+ skipped: result.skipped,
+ link: this.spec.link,
+ message: error.message,
+ trace: error.stack || error.message || "Stack Trace Unavailable"
+ }));
+ }
+ return _results;
+ };
+
+ Console.prototype.reportRunnerResults = function() {
+ this.log({
+ type: "result",
+ elapsed: ((new Teabag.Date().getTime() - this.start.getTime()) / 1000).toFixed(5)
+ });
+ return Teabag.finished = true;
+ };
+
+ Console.prototype.log = function(obj) {
+ if (obj == null) {
+ obj = {};
+ }
+ obj["_teabag"] = true;
+ return Teabag.log(JSON.stringify(obj));
+ };
+
+ return Console;
+
+ })();
+
+}).call(this);
+; FI"required_assets_digest; F"%27dd24d90dd8a5ee769dd8c64df77b98I"
_version; F"%6776f581a4329e299531e1d52aa59832
\ No newline at end of file