spec/dummy/tmp/cache/assets/DF6/0E0/sprockets%2F85b10db6e1afe643aba6d396abdd77f0 in teabag-0.7.1 vs spec/dummy/tmp/cache/assets/DF6/0E0/sprockets%2F85b10db6e1afe643aba6d396abdd77f0 in teabag-0.7.2

- old
+ new

@@ -1,10 +1,9 @@ -o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1362446096.1025028: @value"f{I" +o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1365878745.1395159: @value"ȍ{I" class:EFI"BundledAsset;FI"logical_path;FI"teabag/mocha.js;FI" pathname;FI"P/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/mocha.coffee;FI"content_type;FI"application/javascript;FI" -mtime;FI"2013-03-04T18:14:44-07:00;FI" length;FiI" digest;F"%caf0a60c413370ce28ee37ca6722e147I" source;FI";(function(){ +mtime;FI"2013-04-13T12:44:27-06:00;FI" length;FiI" digest;F"%3ace9187aa803de6287ac2e3e1a54776I" source;FI";(function(){ - // CommonJS require() function require(p){ var path = require.resolve(p) , mod = require.modules[path]; @@ -52,13 +51,13 @@ require.register("browser/debug.js", function(module, exports, require){ module.exports = function(type){ return function(){ - } }; + }); // module: browser/debug.js require.register("browser/diff.js", function(module, exports, require){ /* See license.txt for terms of usage */ @@ -805,11 +804,10 @@ } this._error = err; }; - }); // module: hook.js require.register("interfaces/bdd.js", function(module, exports, require){ /** @@ -1006,10 +1004,11 @@ suites.shift(); } } } }; + }); // module: interfaces/exports.js require.register("interfaces/index.js", function(module, exports, require){ exports.bdd = require('./bdd'); @@ -1549,11 +1548,11 @@ if (this.files.length) this.loadFiles(); var suite = this.suite; var options = this.options; var runner = new exports.Runner(suite); var reporter = new this._reporter(runner); - runner.ignoreLeaks = options.ignoreLeaks; + runner.ignoreLeaks = false !== options.ignoreLeaks; runner.asyncOnly = options.asyncOnly; if (options.grep) runner.grep(options.grep, options.invert); if (options.globals) runner.globals(options.globals); if (options.growl) this._growl(runner, reporter); return runner.run(fn); @@ -2334,12 +2333,10 @@ runner.on('fail', function(test, err){ if ('hook' == test.type) runner.emit('test end', test); }); runner.on('test end', function(test){ - window.scrollTo(0, document.body.scrollHeight); - // TODO: add to stats var percent = stats.tests / this.total * 100 | 0; if (progress) progress.update(percent).draw(ctx); // update stats @@ -3100,14 +3097,14 @@ function F(){}; F.prototype = Base.prototype; Min.prototype = new F; Min.prototype.constructor = Min; + }); // module: reporters/min.js require.register("reporters/nyan.js", function(module, exports, require){ - /** * Module dependencies. */ var Base = require('./base') @@ -3249,49 +3246,44 @@ */ NyanCat.prototype.drawNyanCat = function(status) { var self = this; var startWidth = this.scoreboardWidth + this.trajectories[0].length; + var color = '\u001b[' + startWidth + 'C'; + var padding = ''; - [0, 1, 2, 3].forEach(function(index) { - write('\u001b[' + startWidth + 'C'); + write(color); + write('_,------,'); + write('\n'); - switch (index) { - case 0: - write('_,------,'); - write('\n'); - break; - case 1: - var padding = self.tick ? ' ' : ' '; - write('_|' + padding + '/\\_/\\ '); - write('\n'); - break; - case 2: - var padding = self.tick ? '_' : '__'; - var tail = self.tick ? '~' : '^'; - var face; - switch (status) { - case 'pass': - face = '( ^ .^)'; - break; - case 'fail': - face = '( o .o)'; - break; - default: - face = '( - .-)'; - } - write(tail + '|' + padding + face + ' '); - write('\n'); - break; - case 3: - var padding = self.tick ? ' ' : ' '; - write(padding + '"" "" '); - write('\n'); - break; - } - }); + write(color); + padding = self.tick ? ' ' : ' '; + write('_|' + padding + '/\\_/\\ '); + write('\n'); + write(color); + padding = self.tick ? '_' : '__'; + var tail = self.tick ? '~' : '^'; + var face; + switch (status) { + case 'pass': + face = '( ^ .^)'; + break; + case 'fail': + face = '( o .o)'; + break; + default: + face = '( - .-)'; + } + write(tail + '|' + padding + face + ' '); + write('\n'); + + write(color); + padding = self.tick ? ' ' : ' '; + write(padding + '"" "" '); + write('\n'); + this.cursorUp(this.numberOfLines); }; /** * Move cursor up `n`. @@ -4065,12 +4057,11 @@ var EventEmitter = require('browser/events').EventEmitter , debug = require('browser/debug')('mocha:runner') , Test = require('./test') , utils = require('./utils') , filter = utils.filter - , keys = utils.keys - , noop = function(){}; + , keys = utils.keys; /** * Non-enumerable globals. */ @@ -4119,10 +4110,19 @@ this.grep(/.*/); this.globals(this.globalProps().concat(['errno'])); } /** + * Wrapper for setImmediate, process.nextTick, or browser polyfill. + * + * @param {Function} fn + * @api private + */ + + Runner.immediately = global.setImmediate || process.nextTick; + + /** * Inherit from `EventEmitter.prototype`. */ function F(){}; F.prototype = EventEmitter.prototype; @@ -4303,11 +4303,11 @@ self.emit('hook end', hook); next(++i); }); } - process.nextTick(function(){ + Runner.immediately(function(){ next(0); }); }; /** @@ -4546,18 +4546,20 @@ Runner.prototype.run = function(fn){ var self = this , fn = fn || function(){}; + function uncaught(err){ + self.uncaught(err); + } + debug('start'); // callback this.on('end', function(){ debug('end'); - process.removeListener('uncaughtException', function(err){ - self.uncaught(err); - }); + process.removeListener('uncaughtException', uncaught); fn(self.failures); }); // run suites this.emit('start'); @@ -4565,13 +4567,11 @@ debug('finished running'); self.emit('end'); }); // uncaught exception - process.on('uncaughtException', function(err){ - self.uncaught(err); - }); + process.on('uncaughtException', uncaught); return this; }; /** @@ -5239,38 +5239,10 @@ process.exit = function(status){}; process.stdout = {}; global = window; /** - * next tick implementation. - */ - - process.nextTick = (function(){ - // postMessage behaves badly on IE8 - if (window.ActiveXObject || !window.postMessage) { - return function(fn){ fn() }; - } - - // based on setZeroTimeout by David Baron - // - http://dbaron.org/log/20100309-faster-timeouts - var timeouts = [] - , name = 'mocha-zero-timeout' - - window.addEventListener('message', function(e){ - if (e.source == window && e.data == name) { - if (e.stopPropagation) e.stopPropagation(); - if (timeouts.length) timeouts.shift()(); - } - }, true); - - return function(fn){ - timeouts.push(fn); - window.postMessage(name, '*'); - } - })(); - - /** * Remove uncaughtException listener. */ process.removeListener = function(e){ if ('uncaughtException' == e) { @@ -5298,11 +5270,37 @@ */ var Mocha = window.Mocha = require('mocha'), mocha = window.mocha = new Mocha({ reporter: 'html' }); + var immediateQueue = [] + , immediateTimeout; + + function timeslice() { + var immediateStart = new Date().getTime(); + while (immediateQueue.length && (new Date().getTime() - immediateStart) < 100) { + immediateQueue.shift()(); + } + if (immediateQueue.length) { + immediateTimeout = setTimeout(timeslice, 0); + } else { + immediateTimeout = null; + } + } + /** + * High-performance override of Runner.immediately. + */ + + Mocha.Runner.immediately = function(callback) { + immediateQueue.push(callback); + if (!immediateTimeout) { + immediateTimeout = setTimeout(timeslice, 0); + } + }; + + /** * Override ui to ensure that the ui functions are initialized. * Normally this would happen in Mocha.prototype.loadFiles. */ mocha.ui = function(ui){ @@ -5339,13 +5337,11 @@ }); }; })(); })(); (function() { - this.Teabag = (function() { - function Teabag() {} Teabag.defer = false; Teabag.slow = 75; @@ -5373,10 +5369,11 @@ return new Teabag.Runner(); }; Teabag.resolveDependenciesFromParams = function(all) { var dep, deps, file, parts, path, paths, _i, _j, _len, _len1; + if (all == null) { all = []; } deps = []; if ((paths = this.location.search.match(/[\?&]file(\[\])?=[^&\?]*/gi)) === null) { @@ -5398,20 +5395,24 @@ } return deps; }; Teabag.log = function() { + var e; + this.messages.push(arguments[0]); try { return console.log.apply(console, arguments); - } catch (e) { + } catch (_error) { + e = _error; throw new Error("Unable to use console.log for logging"); } }; Teabag.getMessages = function() { var messages; + messages = this.messages; this.messages = []; return messages; }; @@ -5419,13 +5420,11 @@ })(); }).call(this); (function() { - Teabag.Runner = (function() { - Runner.run = false; function Runner() { if (this.constructor.run) { return; @@ -5436,10 +5435,11 @@ this.setup(); } Runner.prototype.getParams = function() { var name, param, params, value, _i, _len, _ref, _ref1; + params = {}; _ref = Teabag.location.search.substring(1).split("&"); for (_i = 0, _len = _ref.length; _i < _len; _i++) { param = _ref[_i]; _ref1 = param.split("="), name = _ref1[0], value = _ref1[1]; @@ -5482,10 +5482,11 @@ fixture.json = []; fixture.preload = function() { var url, urls, _i, _len, _results; + urls = 1 <= arguments.length ? __slice.call(arguments, 0) : []; _results = []; for (_i = 0, _len = urls.length; _i < _len; _i++) { url = urls[_i]; _results.push(preload(url)); @@ -5493,10 +5494,11 @@ return _results; }; fixture.load = function() { var append, index, url, urls, _i, _j, _len, _results; + urls = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), append = arguments[_i++]; if (append == null) { append = false; } if (typeof append !== "boolean") { @@ -5511,10 +5513,11 @@ return _results; }; fixture.set = function() { var append, html, htmls, index, _i, _j, _len, _results; + htmls = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), append = arguments[_i++]; if (append == null) { append = false; } if (typeof append !== "boolean") { @@ -5543,10 +5546,11 @@ return load(url, false, true); }; load = function(url, append, preload) { var cached, value; + if (preload == null) { preload = false; } if (cached = Teabag.fixture.cache[url]) { return loadComplete(url, cached.type, cached.content, append, preload); @@ -5604,40 +5608,45 @@ return Teabag.fixture.el.innerHTML += content; }; create = function() { var _ref; + Teabag.fixture.el = document.createElement("div"); if (typeof window.$ === 'function') { Teabag.fixture.$el = $(Teabag.fixture.el); } Teabag.fixture.el.id = "teabag-fixtures"; return (_ref = document.body) != null ? _ref.appendChild(Teabag.fixture.el) : void 0; }; cleanup = function() { var _base, _ref, _ref1; + (_base = Teabag.fixture).el || (_base.el = document.getElementById("teabag-fixtures")); if ((_ref = Teabag.fixture.el) != null) { if ((_ref1 = _ref.parentNode) != null) { _ref1.removeChild(Teabag.fixture.el); } } return Teabag.fixture.el = null; }; xhrRequest = function(url, callback) { + var e; + if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else if (window.ActiveXObject) { try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { + } catch (_error) { + e = _error; try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); - } catch (e) { - + } catch (_error) { + e = _error; } } } if (!xhr) { throw "Unable to make Ajax Request"; @@ -5651,13 +5660,11 @@ }).call(this); }).call(this); (function() { - Teabag.Reporters.BaseView = (function() { - function BaseView() { this.elements = {}; this.build(); } @@ -5673,32 +5680,36 @@ return this.el.appendChild(el); }; BaseView.prototype.createEl = function(type, className) { var el; + if (className == null) { className = ""; } el = document.createElement(type); el.className = className; return el; }; BaseView.prototype.findEl = function(id) { var _base; + this.elements || (this.elements = {}); return (_base = this.elements)[id] || (_base[id] = document.getElementById("teabag-" + id)); }; BaseView.prototype.setText = function(id, value) { var el; + el = this.findEl(id); return el.innerHTML = value; }; BaseView.prototype.setHtml = function(id, value, add) { var el; + if (add == null) { add = false; } el = this.findEl(id); if (add) { @@ -5708,16 +5719,18 @@ } }; BaseView.prototype.setClass = function(id, value) { var el; + el = this.findEl(id); return el.className = value; }; BaseView.prototype.htmlSafe = function(str) { var el; + el = document.createElement("div"); el.appendChild(document.createTextNode(str)); return el.innerHTML; }; @@ -5730,18 +5743,15 @@ 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) { - __extends(HTML, _super); function HTML() { this.toggleConfig = __bind(this.toggleConfig, this); - - this.reportRunnerResults = __bind(this.reportRunnerResults, this); - this.start = new Teabag.Date().getTime(); + this.reportRunnerResults = __bind(this.reportRunnerResults, this); this.start = new Teabag.Date().getTime(); this.config = { "use-catch": true, "build-full-report": false, "display-progress": true }; @@ -5762,10 +5772,11 @@ HTML.__super__.constructor.apply(this, arguments); } HTML.prototype.build = function() { var _ref; + this.buildLayout(); this.setText("env-info", this.envInfo()); this.setText("version", Teabag.version); this.findEl("toggles").onclick = this.toggleConfig; this.findEl("suites").innerHTML = this.buildSuiteSelect(); @@ -5779,18 +5790,20 @@ return this.buildFilters(); }; HTML.prototype.buildLayout = function() { var el; + el = this.createEl("div"); el.id = "teabag-interface"; el.innerHTML = Teabag.Reporters.HTML.template; return document.body.appendChild(el); }; HTML.prototype.buildSuiteSelect = function() { var options, suite, _i, _len, _ref; + if (Teabag.suites.all.length === 1) { return ""; } options = []; _ref = Teabag.suites.all; @@ -5863,10 +5876,11 @@ return this.setText("stats-" + name, value); }; HTML.prototype.updateStatus = function(spec) { var elapsed, result, _ref, _ref1; + spec = new Teabag.Spec(spec); result = spec.result(); if (result.skipped || result.status === "pending") { this.updateStat("skipped", this.total.skipped += 1); return; @@ -5891,10 +5905,11 @@ return this.progress.update(this.total.exist, this.total.run); }; HTML.prototype.showConfiguration = function() { var key, value, _ref, _results; + _ref = this.config; _results = []; for (key in _ref) { value = _ref[key]; _results.push(this.setClass(key, value ? "active" : "")); @@ -5906,10 +5921,11 @@ return document.body.className = "teabag-" + status; }; HTML.prototype.setFilters = function() { var link; + link = [Teabag.root, Teabag.suites.active].join('/'); if (Teabag.params["file"]) { this.filters.push("<a href='" + link + "'>remove</a> by file: " + Teabag.params["file"]); } if (Teabag.params["grep"]) { @@ -5917,17 +5933,19 @@ } }; HTML.prototype.readConfig = function() { var config; + if (config = this.cookie("teabag")) { return this.config = config; } }; HTML.prototype.toggleConfig = function(e) { var button, name; + button = e.target; if (button.tagName.toLowerCase() !== "button") { return; } name = button.getAttribute("id").replace(/^teabag-/, ""); @@ -5944,10 +5962,11 @@ return window.location.href = window.location.href; }; HTML.prototype.cookie = function(name, value) { var date, match; + if (value == null) { value = void 0; } if (value === void 0) { name = name.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1"); @@ -5964,19 +5983,20 @@ })(Teabag.Reporters.BaseView); }).call(this); (function() { - var __hasProp = {}.hasOwnProperty, + var _ref, _ref1, _ref2, + __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.ProgressView = (function(_super) { - __extends(ProgressView, _super); function ProgressView() { - return ProgressView.__super__.constructor.apply(this, arguments); + _ref = ProgressView.__super__.constructor.apply(this, arguments); + return _ref; } ProgressView.create = function(displayProgress) { if (displayProgress == null) { displayProgress = true; @@ -6000,64 +6020,67 @@ return ProgressView; })(Teabag.Reporters.BaseView); Teabag.Reporters.HTML.SimpleProgressView = (function(_super) { - __extends(SimpleProgressView, _super); function SimpleProgressView() { - return SimpleProgressView.__super__.constructor.apply(this, arguments); + _ref1 = SimpleProgressView.__super__.constructor.apply(this, arguments); + return _ref1; } SimpleProgressView.prototype.build = function() { this.el = this.createEl("div", "simple-progress"); return this.el.innerHTML = "<em id=\"teabag-progress-percent\">0%</em>\n<span id=\"teabag-progress-span\" class=\"teabag-indicator\"></span>"; }; SimpleProgressView.prototype.update = function(total, run) { var percent; + percent = total ? Math.ceil((run * 100) / total) : 0; return this.setHtml("progress-percent", "" + percent + "%"); }; return SimpleProgressView; })(Teabag.Reporters.HTML.ProgressView); Teabag.Reporters.HTML.RadialProgressView = (function(_super) { - __extends(RadialProgressView, _super); function RadialProgressView() { - return RadialProgressView.__super__.constructor.apply(this, arguments); + _ref2 = RadialProgressView.__super__.constructor.apply(this, arguments); + return _ref2; } RadialProgressView.supported = !!document.createElement("canvas").getContext; RadialProgressView.prototype.build = function() { this.el = this.createEl("div", "teabag-indicator radial-progress"); return this.el.innerHTML = "<canvas id=\"teabag-progress-canvas\"></canvas>\n<em id=\"teabag-progress-percent\">0%</em>"; }; RadialProgressView.prototype.appendTo = function() { - var canvas; + var canvas, e; + RadialProgressView.__super__.appendTo.apply(this, arguments); this.size = 80; try { canvas = this.findEl("progress-canvas"); canvas.width = canvas.height = canvas.style.width = canvas.style.height = this.size; this.ctx = canvas.getContext("2d"); this.ctx.strokeStyle = "#fff"; return this.ctx.lineWidth = 1.5; - } catch (e) { - + } catch (_error) { + e = _error; } }; RadialProgressView.prototype.update = function(total, run) { var half, percent; + percent = total ? Math.ceil((run * 100) / total) : 0; this.setHtml("progress-percent", "" + percent + "%"); if (!this.ctx) { return; } @@ -6093,10 +6116,11 @@ SpecView.__super__.constructor.apply(this, arguments); } SpecView.prototype.build = function() { var classes; + classes = ["spec"]; if (this.spec.pending) { classes.push("state-pending"); } SpecView.__super__.build.call(this, classes.join(" ")); @@ -6105,10 +6129,11 @@ return this.parentView.append(this.el); }; SpecView.prototype.buildParent = function() { var parent, view; + parent = this.spec.parent; if (parent.viewId) { return this.views.suites[parent.viewId]; } else { view = new Teabag.Reporters.HTML.SuiteView(parent, this.reporter); @@ -6116,10 +6141,11 @@ } }; SpecView.prototype.buildErrors = function() { var div, error, html, _i, _len, _ref; + div = this.createEl("div"); html = ""; _ref = this.spec.errors(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { error = _ref[_i]; @@ -6129,10 +6155,11 @@ return this.append(div); }; SpecView.prototype.updateState = function(state, elapsed) { var classes, result, _base; + result = this.spec.result(); classes = ["state-" + state]; if (elapsed > Teabag.slow) { classes.push("slow"); } @@ -6154,20 +6181,20 @@ (function() { var __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.FailureView = (function(_super) { - __extends(FailureView, _super); function FailureView(spec) { this.spec = spec; FailureView.__super__.constructor.apply(this, arguments); } FailureView.prototype.build = function() { var error, html, _i, _len, _ref; + FailureView.__super__.build.call(this, "spec"); html = "<h1 class=\"teabag-clearfix\"><a href=\"" + this.spec.link + "\">" + this.spec.fullDescription + "</a></h1>"; _ref = this.spec.errors(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { error = _ref[_i]; @@ -6209,10 +6236,11 @@ return this.parentView.append(this.el); }; SuiteView.prototype.buildParent = function() { var parent, view; + parent = this.suite.parent; if (!parent) { return this.reporter; } if (parent.viewId) { @@ -6230,10 +6258,11 @@ return this.ol.appendChild(el); }; SuiteView.prototype.updateState = function(state) { var _base; + if (this.state === "failed") { return; } this.el.className = "" + (this.el.className.replace(/\s?state-\w+/, "")) + " state-" + state; if (typeof (_base = this.parentView).updateState === "function") { @@ -6246,22 +6275,19 @@ })(Teabag.Reporters.BaseView); }).call(this); (function() { - Teabag.Reporters.HTML.template = "<div class=\"teabag-clearfix\">\n <div id=\"teabag-title\">\n <h1><a href=\"\" id=\"teabag-root-link\">Teabag</a></h1>\n <ul>\n <li>version: <b id=\"teabag-version\"></b></li>\n <li id=\"teabag-env-info\"></li>\n </ul>\n </div>\n <div id=\"teabag-progress\"></div>\n <ul id=\"teabag-stats\">\n <li>passes: <b id=\"teabag-stats-passes\">0</b></li>\n <li>failures: <b id=\"teabag-stats-failures\">0</b></li>\n <li>skipped: <b id=\"teabag-stats-skipped\">0</b></li>\n <li>duration: <b id=\"teabag-stats-duration\">&infin;</b></li>\n </ul>\n</div>\n\n<div id=\"teabag-controls\" class=\"teabag-clearfix\">\n <div id=\"teabag-toggles\">\n <button id=\"teabag-use-catch\" title=\"Toggle using try/catch wrappers when possible\">Try/Catch</button>\n <button id=\"teabag-build-full-report\" title=\"Toggle building the full report\">Full Report</button>\n <button id=\"teabag-display-progress\" title=\"Toggle displaying progress as tests run\">Progress</button>\n </div>\n <div id=\"teabag-suites\"></div>\n</div>\n\n<hr/>\n\n<div id=\"teabag-filter\">\n <h1>Filtering</h1>\n <ul id=\"teabag-filter-list\"></ul>\n</div>\n\n<div id=\"teabag-report\">\n <ol id=\"teabag-report-failures\"></ol>\n <ol id=\"teabag-report-all\"></ol>\n</div>"; }).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(); + this.reportRunnerResults = __bind(this.reportRunnerResults, this); this.start = new Teabag.Date(); this.suites = {}; } Console.prototype.reportRunnerStarting = function(runner) { return this.log({ @@ -6271,10 +6297,11 @@ }); }; 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]) { @@ -6290,10 +6317,11 @@ return _results; }; Console.prototype.reportSpecResults = function(spec) { var result; + this.spec = new Teabag.Spec(spec); result = this.spec.result(); if (result.skipped) { return; } @@ -6314,10 +6342,11 @@ } }; Console.prototype.trackPending = function() { var result; + result = this.spec.result(); return this.log({ type: "spec", suite: this.spec.suiteName, label: this.spec.description, @@ -6326,10 +6355,11 @@ }); }; 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]; @@ -6402,21 +6432,20 @@ })(Teabag.Reporters.Console); }).call(this); (function() { - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + var _ref, + __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) { - __extends(HTML, _super); function HTML(runner) { - this.reportSpecResults = __bind(this.reportSpecResults, this); - HTML.__super__.constructor.apply(this, arguments); + this.reportSpecResults = __bind(this.reportSpecResults, this); HTML.__super__.constructor.apply(this, arguments); this.reportRunnerStarting(runner); runner.on("fail", this.reportSpecResults); runner.on("test end", this.reportSpecResults); runner.on("end", this.reportRunnerResults); } @@ -6432,23 +6461,23 @@ this.reportSpecStarting(spec); return HTML.__super__.reportSpecResults.apply(this, arguments); }; HTML.prototype.envInfo = function() { - return "mocha 1.8.1"; + return "mocha 1.9.1"; }; return HTML; })(Teabag.Reporters.HTML); Teabag.Reporters.HTML.SpecView = (function(_super) { - __extends(SpecView, _super); function SpecView() { - return SpecView.__super__.constructor.apply(this, arguments); + _ref = SpecView.__super__.constructor.apply(this, arguments); + return _ref; } SpecView.prototype.updateState = function(state) { return SpecView.__super__.updateState.call(this, state, this.spec.spec.duration); }; @@ -6457,16 +6486,15 @@ })(Teabag.Reporters.HTML.SpecView); }).call(this); (function() { - var env, + var env, _ref, __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.Runner = (function(_super) { - __extends(Runner, _super); function Runner() { Runner.__super__.constructor.apply(this, arguments); env.run(); @@ -6476,10 +6504,11 @@ }); } Runner.prototype.setup = function() { var reporter; + reporter = this.getReporter(); return env.setup({ reporter: reporter }); }; @@ -6487,11 +6516,10 @@ return Runner; })(Teabag.Runner); Teabag.Spec = (function() { - function Spec(spec) { this.spec = spec; this.fullDescription = this.spec.fullTitle(); this.description = this.spec.title; this.link = "?grep=" + (encodeURIComponent(this.fullDescription)); @@ -6508,10 +6536,11 @@ return [this.spec.err]; }; Spec.prototype.getParents = function() { var parent; + if (this.parents) { return this.parents; } this.parents || (this.parents = []); parent = this.parent; @@ -6523,10 +6552,11 @@ return this.parents; }; Spec.prototype.result = function() { var status; + status = "failed"; if (this.spec.state === "passed" || this.spec.state === "skipped") { status = "passed"; } if (this.spec.pending) { @@ -6541,11 +6571,10 @@ return Spec; })(); Teabag.Suite = (function() { - function Suite(suite) { this.suite = suite; this.fullDescription = this.suite.fullTitle(); this.description = this.suite.title; this.link = "?grep=" + (encodeURIComponent(this.fullDescription)); @@ -6556,22 +6585,23 @@ return Suite; })(); Teabag.fixture = (function(_super) { - __extends(fixture, _super); function fixture() { - return fixture.__super__.constructor.apply(this, arguments); + _ref = fixture.__super__.constructor.apply(this, arguments); + return _ref; } window.fixture = fixture; fixture.load = function() { var args, _this = this; + args = arguments; if (env.started) { return fixture.__super__.constructor.load.apply(this, arguments); } else { return beforeEach(function() { @@ -6581,10 +6611,11 @@ }; fixture.set = function() { var args, _this = this; + args = arguments; if (env.started) { return fixture.__super__.constructor.set.apply(this, arguments); } else { return beforeEach(function() { @@ -6598,6 +6629,6 @@ })(Teabag.fixture); env = mocha.setup("bdd"); }).call(this); -;TI"required_assets_digest;F"%012c25914c198b361612a37c84cd7e54I" _version;F"%6776f581a4329e299531e1d52aa59832 +;TI"required_assets_digest;F"%9ef2eed349dc4311159085937f3df454I" _version;F"%6776f581a4329e299531e1d52aa59832 \ No newline at end of file