teaspoon 0.7.8 → 0.7.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -5
- data/app/assets/javascripts/teaspoon-angular.js +19 -27
- data/app/assets/javascripts/teaspoon-jasmine.js +19 -27
- data/app/assets/javascripts/teaspoon-mocha.js +19 -28
- data/app/assets/javascripts/teaspoon-qunit.js +41 -15
- data/app/assets/javascripts/teaspoon/base/reporters/html/failure_view.coffee +1 -1
- data/app/assets/javascripts/teaspoon/base/reporters/html/spec_view.coffee +1 -1
- data/app/assets/javascripts/teaspoon/base/reporters/html/suite_view.coffee +1 -1
- data/app/assets/javascripts/teaspoon/base/teaspoon.coffee +12 -7
- data/app/assets/javascripts/teaspoon/qunit/reporters/html.coffee +1 -1
- data/app/assets/stylesheets/teaspoon.css +1 -1
- data/app/helpers/teaspoon/spec_helper.rb +2 -1
- data/lib/generators/teaspoon/install/templates/jasmine/spec_helper.coffee +4 -0
- data/lib/generators/teaspoon/install/templates/jasmine/spec_helper.js +4 -0
- data/lib/generators/teaspoon/install/templates/mocha/spec_helper.coffee +6 -2
- data/lib/generators/teaspoon/install/templates/mocha/spec_helper.js +4 -0
- data/lib/generators/teaspoon/install/templates/qunit/test_helper.coffee +4 -0
- data/lib/generators/teaspoon/install/templates/qunit/test_helper.js +4 -0
- data/lib/teaspoon/configuration.rb +4 -3
- data/lib/teaspoon/coverage.rb +3 -2
- data/lib/teaspoon/drivers/phantomjs/runner.js +108 -0
- data/lib/teaspoon/drivers/phantomjs_driver.rb +25 -7
- data/lib/teaspoon/engine.rb +5 -0
- data/lib/teaspoon/environment.rb +2 -4
- data/lib/teaspoon/formatters/base_formatter.rb +9 -6
- data/lib/teaspoon/formatters/dot_formatter.rb +3 -2
- data/lib/teaspoon/formatters/pride_formatter.rb +48 -0
- data/lib/teaspoon/formatters/snowday_formatter.rb +20 -0
- data/lib/teaspoon/server.rb +9 -3
- data/lib/teaspoon/suite.rb +3 -3
- data/lib/teaspoon/version.rb +1 -1
- data/spec/dummy/config/initializers/teaspoon.rb +1 -1
- data/spec/javascripts/teaspoon/base/teaspoon_spec.coffee +4 -4
- data/spec/javascripts/teaspoon/other/erb_spec.js.coffee.erb +4 -0
- data/spec/javascripts/teaspoon/phantomjs/runner_spec.coffee +1 -1
- data/spec/teaspoon/configuration_spec.rb +2 -1
- data/spec/teaspoon/coverage_spec.rb +1 -1
- data/spec/teaspoon/drivers/phantomjs_driver_spec.rb +28 -14
- data/spec/teaspoon/environment_spec.rb +2 -3
- data/spec/teaspoon/formatters/base_formatter_spec.rb +3 -2
- data/spec/teaspoon/formatters/pride_formatter_spec.rb +0 -0
- data/spec/teaspoon/suite_spec.rb +5 -0
- data/vendor/assets/javascripts/support/bind-poly.js +23 -0
- metadata +10 -17
- data/lib/teaspoon/drivers/phantomjs/runner.coffee +0 -68
@@ -5394,14 +5394,21 @@
|
|
5394
5394
|
Teaspoon.messages = [];
|
5395
5395
|
|
5396
5396
|
Teaspoon.execute = function() {
|
5397
|
-
if (
|
5398
|
-
|
5397
|
+
if (Teaspoon.defer) {
|
5398
|
+
Teaspoon.defer = false;
|
5399
5399
|
return;
|
5400
5400
|
}
|
5401
|
-
|
5401
|
+
if (Teaspoon.started) {
|
5402
|
+
Teaspoon.reload();
|
5403
|
+
}
|
5404
|
+
Teaspoon.started = true;
|
5402
5405
|
return new Teaspoon.Runner();
|
5403
5406
|
};
|
5404
5407
|
|
5408
|
+
Teaspoon.reload = function() {
|
5409
|
+
return window.location.reload();
|
5410
|
+
};
|
5411
|
+
|
5405
5412
|
Teaspoon.onWindowLoad = function(method) {
|
5406
5413
|
var originalOnload;
|
5407
5414
|
originalOnload = window.onload;
|
@@ -5419,7 +5426,7 @@
|
|
5419
5426
|
all = [];
|
5420
5427
|
}
|
5421
5428
|
deps = [];
|
5422
|
-
if ((paths =
|
5429
|
+
if ((paths = Teaspoon.location.search.match(/[\?&]file(\[\])?=[^&\?]*/gi)) === null) {
|
5423
5430
|
return all;
|
5424
5431
|
}
|
5425
5432
|
for (_i = 0, _len = paths.length; _i < _len; _i++) {
|
@@ -5441,7 +5448,7 @@
|
|
5441
5448
|
|
5442
5449
|
Teaspoon.log = function() {
|
5443
5450
|
var e;
|
5444
|
-
|
5451
|
+
Teaspoon.messages.push(arguments[0]);
|
5445
5452
|
try {
|
5446
5453
|
return console.log.apply(console, arguments);
|
5447
5454
|
} catch (_error) {
|
@@ -5452,8 +5459,8 @@
|
|
5452
5459
|
|
5453
5460
|
Teaspoon.getMessages = function() {
|
5454
5461
|
var messages;
|
5455
|
-
messages =
|
5456
|
-
|
5462
|
+
messages = Teaspoon.messages;
|
5463
|
+
Teaspoon.messages = [];
|
5457
5464
|
return messages;
|
5458
5465
|
};
|
5459
5466
|
|
@@ -5790,7 +5797,8 @@
|
|
5790
5797
|
|
5791
5798
|
function HTML() {
|
5792
5799
|
this.toggleConfig = __bind(this.toggleConfig, this);
|
5793
|
-
this.reportRunnerResults = __bind(this.reportRunnerResults, this);
|
5800
|
+
this.reportRunnerResults = __bind(this.reportRunnerResults, this);
|
5801
|
+
this.start = new Teaspoon.Date().getTime();
|
5794
5802
|
this.config = {
|
5795
5803
|
"use-catch": true,
|
5796
5804
|
"build-full-report": false,
|
@@ -5815,7 +5823,6 @@
|
|
5815
5823
|
|
5816
5824
|
HTML.prototype.build = function() {
|
5817
5825
|
var _ref;
|
5818
|
-
|
5819
5826
|
this.buildLayout();
|
5820
5827
|
this.setText("env-info", this.envInfo());
|
5821
5828
|
this.setText("version", Teaspoon.version);
|
@@ -5833,7 +5840,6 @@
|
|
5833
5840
|
|
5834
5841
|
HTML.prototype.buildLayout = function() {
|
5835
5842
|
var el;
|
5836
|
-
|
5837
5843
|
el = this.createEl("div");
|
5838
5844
|
el.id = "teaspoon-interface";
|
5839
5845
|
el.innerHTML = Teaspoon.Reporters.HTML.template;
|
@@ -5842,7 +5848,6 @@
|
|
5842
5848
|
|
5843
5849
|
HTML.prototype.buildSuiteSelect = function() {
|
5844
5850
|
var options, suite, _i, _len, _ref;
|
5845
|
-
|
5846
5851
|
if (Teaspoon.suites.all.length === 1) {
|
5847
5852
|
return "";
|
5848
5853
|
}
|
@@ -5919,7 +5924,6 @@
|
|
5919
5924
|
|
5920
5925
|
HTML.prototype.updateStatus = function(spec) {
|
5921
5926
|
var elapsed, result, _ref, _ref1;
|
5922
|
-
|
5923
5927
|
spec = new Teaspoon.Spec(spec);
|
5924
5928
|
result = spec.result();
|
5925
5929
|
if (result.skipped || result.status === "pending") {
|
@@ -5948,7 +5952,6 @@
|
|
5948
5952
|
|
5949
5953
|
HTML.prototype.showConfiguration = function() {
|
5950
5954
|
var key, value, _ref, _results;
|
5951
|
-
|
5952
5955
|
_ref = this.config;
|
5953
5956
|
_results = [];
|
5954
5957
|
for (key in _ref) {
|
@@ -5964,7 +5967,6 @@
|
|
5964
5967
|
|
5965
5968
|
HTML.prototype.setFilters = function() {
|
5966
5969
|
var link;
|
5967
|
-
|
5968
5970
|
link = [Teaspoon.root, Teaspoon.suites.active].join('/');
|
5969
5971
|
if (Teaspoon.params["file"]) {
|
5970
5972
|
this.filters.push("by file: " + Teaspoon.params["file"] + " <a href='" + link + "'>remove</a>");
|
@@ -5976,7 +5978,6 @@
|
|
5976
5978
|
|
5977
5979
|
HTML.prototype.readConfig = function() {
|
5978
5980
|
var config;
|
5979
|
-
|
5980
5981
|
if (config = this.cookie("teaspoon")) {
|
5981
5982
|
return this.config = config;
|
5982
5983
|
}
|
@@ -5984,7 +5985,6 @@
|
|
5984
5985
|
|
5985
5986
|
HTML.prototype.toggleConfig = function(e) {
|
5986
5987
|
var button, name;
|
5987
|
-
|
5988
5988
|
button = e.target;
|
5989
5989
|
if (button.tagName.toLowerCase() !== "button") {
|
5990
5990
|
return;
|
@@ -6005,7 +6005,6 @@
|
|
6005
6005
|
|
6006
6006
|
HTML.prototype.cookie = function(name, value) {
|
6007
6007
|
var date, match;
|
6008
|
-
|
6009
6008
|
if (value == null) {
|
6010
6009
|
value = void 0;
|
6011
6010
|
}
|
@@ -6159,20 +6158,18 @@
|
|
6159
6158
|
|
6160
6159
|
SpecView.prototype.build = function() {
|
6161
6160
|
var classes;
|
6162
|
-
|
6163
6161
|
classes = ["spec"];
|
6164
6162
|
if (this.spec.pending) {
|
6165
6163
|
classes.push("state-pending");
|
6166
6164
|
}
|
6167
6165
|
SpecView.__super__.build.call(this, classes.join(" "));
|
6168
|
-
this.el.innerHTML = "<a href=\"" + this.spec.link + "\">" + this.spec.description + "</a>";
|
6166
|
+
this.el.innerHTML = "<a href=\"" + this.spec.link + "\">" + (this.htmlSafe(this.spec.description)) + "</a>";
|
6169
6167
|
this.parentView = this.buildParent();
|
6170
6168
|
return this.parentView.append(this.el);
|
6171
6169
|
};
|
6172
6170
|
|
6173
6171
|
SpecView.prototype.buildParent = function() {
|
6174
6172
|
var parent, view;
|
6175
|
-
|
6176
6173
|
parent = this.spec.parent;
|
6177
6174
|
if (parent.viewId) {
|
6178
6175
|
return this.views.suites[parent.viewId];
|
@@ -6184,7 +6181,6 @@
|
|
6184
6181
|
|
6185
6182
|
SpecView.prototype.buildErrors = function() {
|
6186
6183
|
var div, error, html, _i, _len, _ref;
|
6187
|
-
|
6188
6184
|
div = this.createEl("div");
|
6189
6185
|
html = "";
|
6190
6186
|
_ref = this.spec.errors();
|
@@ -6198,7 +6194,6 @@
|
|
6198
6194
|
|
6199
6195
|
SpecView.prototype.updateState = function(state, elapsed) {
|
6200
6196
|
var classes, result, _base;
|
6201
|
-
|
6202
6197
|
result = this.spec.result();
|
6203
6198
|
classes = ["state-" + state];
|
6204
6199
|
if (elapsed > Teaspoon.slow) {
|
@@ -6233,9 +6228,8 @@
|
|
6233
6228
|
|
6234
6229
|
FailureView.prototype.build = function() {
|
6235
6230
|
var error, html, _i, _len, _ref;
|
6236
|
-
|
6237
6231
|
FailureView.__super__.build.call(this, "spec");
|
6238
|
-
html = "<h1 class=\"teaspoon-clearfix\"><a href=\"" + this.spec.link + "\">" + this.spec.fullDescription + "</a></h1>";
|
6232
|
+
html = "<h1 class=\"teaspoon-clearfix\"><a href=\"" + this.spec.link + "\">" + (this.htmlSafe(this.spec.fullDescription)) + "</a></h1>";
|
6239
6233
|
_ref = this.spec.errors();
|
6240
6234
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
6241
6235
|
error = _ref[_i];
|
@@ -6272,14 +6266,13 @@
|
|
6272
6266
|
|
6273
6267
|
SuiteView.prototype.build = function() {
|
6274
6268
|
SuiteView.__super__.build.call(this, "suite");
|
6275
|
-
this.el.innerHTML = "<h1><a href=\"" + this.suite.link + "\">" + this.suite.description + "</a></h1>";
|
6269
|
+
this.el.innerHTML = "<h1><a href=\"" + this.suite.link + "\">" + (this.htmlSafe(this.suite.description)) + "</a></h1>";
|
6276
6270
|
this.parentView = this.buildParent();
|
6277
6271
|
return this.parentView.append(this.el);
|
6278
6272
|
};
|
6279
6273
|
|
6280
6274
|
SuiteView.prototype.buildParent = function() {
|
6281
6275
|
var parent, view;
|
6282
|
-
|
6283
6276
|
parent = this.suite.parent;
|
6284
6277
|
if (!parent) {
|
6285
6278
|
return this.reporter;
|
@@ -6301,7 +6294,6 @@
|
|
6301
6294
|
|
6302
6295
|
SuiteView.prototype.updateState = function(state) {
|
6303
6296
|
var _base;
|
6304
|
-
|
6305
6297
|
if (this.state === "failed") {
|
6306
6298
|
return;
|
6307
6299
|
}
|
@@ -6611,7 +6603,6 @@
|
|
6611
6603
|
Teaspoon.Suite = (function() {
|
6612
6604
|
function Suite(suite) {
|
6613
6605
|
var _ref;
|
6614
|
-
|
6615
6606
|
this.suite = suite;
|
6616
6607
|
this.fullDescription = this.suite.fullTitle();
|
6617
6608
|
this.description = this.suite.title;
|
@@ -2234,14 +2234,21 @@ if ( typeof exports !== "undefined" ) {
|
|
2234
2234
|
Teaspoon.messages = [];
|
2235
2235
|
|
2236
2236
|
Teaspoon.execute = function() {
|
2237
|
-
if (
|
2238
|
-
|
2237
|
+
if (Teaspoon.defer) {
|
2238
|
+
Teaspoon.defer = false;
|
2239
2239
|
return;
|
2240
2240
|
}
|
2241
|
-
|
2241
|
+
if (Teaspoon.started) {
|
2242
|
+
Teaspoon.reload();
|
2243
|
+
}
|
2244
|
+
Teaspoon.started = true;
|
2242
2245
|
return new Teaspoon.Runner();
|
2243
2246
|
};
|
2244
2247
|
|
2248
|
+
Teaspoon.reload = function() {
|
2249
|
+
return window.location.reload();
|
2250
|
+
};
|
2251
|
+
|
2245
2252
|
Teaspoon.onWindowLoad = function(method) {
|
2246
2253
|
var originalOnload;
|
2247
2254
|
originalOnload = window.onload;
|
@@ -2259,7 +2266,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2259
2266
|
all = [];
|
2260
2267
|
}
|
2261
2268
|
deps = [];
|
2262
|
-
if ((paths =
|
2269
|
+
if ((paths = Teaspoon.location.search.match(/[\?&]file(\[\])?=[^&\?]*/gi)) === null) {
|
2263
2270
|
return all;
|
2264
2271
|
}
|
2265
2272
|
for (_i = 0, _len = paths.length; _i < _len; _i++) {
|
@@ -2281,7 +2288,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2281
2288
|
|
2282
2289
|
Teaspoon.log = function() {
|
2283
2290
|
var e;
|
2284
|
-
|
2291
|
+
Teaspoon.messages.push(arguments[0]);
|
2285
2292
|
try {
|
2286
2293
|
return console.log.apply(console, arguments);
|
2287
2294
|
} catch (_error) {
|
@@ -2292,8 +2299,8 @@ if ( typeof exports !== "undefined" ) {
|
|
2292
2299
|
|
2293
2300
|
Teaspoon.getMessages = function() {
|
2294
2301
|
var messages;
|
2295
|
-
messages =
|
2296
|
-
|
2302
|
+
messages = Teaspoon.messages;
|
2303
|
+
Teaspoon.messages = [];
|
2297
2304
|
return messages;
|
2298
2305
|
};
|
2299
2306
|
|
@@ -2318,6 +2325,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2318
2325
|
|
2319
2326
|
Runner.prototype.getParams = function() {
|
2320
2327
|
var name, param, params, value, _i, _len, _ref, _ref1;
|
2328
|
+
|
2321
2329
|
params = {};
|
2322
2330
|
_ref = Teaspoon.location.search.substring(1).split("&");
|
2323
2331
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
@@ -2364,6 +2372,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2364
2372
|
|
2365
2373
|
fixture.preload = function() {
|
2366
2374
|
var url, urls, _i, _len, _results;
|
2375
|
+
|
2367
2376
|
urls = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
|
2368
2377
|
_results = [];
|
2369
2378
|
for (_i = 0, _len = urls.length; _i < _len; _i++) {
|
@@ -2375,6 +2384,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2375
2384
|
|
2376
2385
|
fixture.load = function() {
|
2377
2386
|
var append, index, url, urls, _i, _j, _len, _results;
|
2387
|
+
|
2378
2388
|
urls = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), append = arguments[_i++];
|
2379
2389
|
if (append == null) {
|
2380
2390
|
append = false;
|
@@ -2393,6 +2403,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2393
2403
|
|
2394
2404
|
fixture.set = function() {
|
2395
2405
|
var append, html, htmls, index, _i, _j, _len, _results;
|
2406
|
+
|
2396
2407
|
htmls = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), append = arguments[_i++];
|
2397
2408
|
if (append == null) {
|
2398
2409
|
append = false;
|
@@ -2425,6 +2436,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2425
2436
|
|
2426
2437
|
load = function(url, append, preload) {
|
2427
2438
|
var cached, value;
|
2439
|
+
|
2428
2440
|
if (preload == null) {
|
2429
2441
|
preload = false;
|
2430
2442
|
}
|
@@ -2486,6 +2498,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2486
2498
|
|
2487
2499
|
create = function() {
|
2488
2500
|
var _ref;
|
2501
|
+
|
2489
2502
|
Teaspoon.fixture.el = document.createElement("div");
|
2490
2503
|
if (typeof window.$ === 'function') {
|
2491
2504
|
Teaspoon.fixture.$el = $(Teaspoon.fixture.el);
|
@@ -2496,6 +2509,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2496
2509
|
|
2497
2510
|
cleanup = function() {
|
2498
2511
|
var _base, _ref, _ref1;
|
2512
|
+
|
2499
2513
|
(_base = Teaspoon.fixture).el || (_base.el = document.getElementById("teaspoon-fixtures"));
|
2500
2514
|
if ((_ref = Teaspoon.fixture.el) != null) {
|
2501
2515
|
if ((_ref1 = _ref.parentNode) != null) {
|
@@ -2507,6 +2521,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2507
2521
|
|
2508
2522
|
xhrRequest = function(url, callback) {
|
2509
2523
|
var e;
|
2524
|
+
|
2510
2525
|
if (window.XMLHttpRequest) {
|
2511
2526
|
xhr = new XMLHttpRequest();
|
2512
2527
|
} else if (window.ActiveXObject) {
|
@@ -2555,6 +2570,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2555
2570
|
|
2556
2571
|
BaseView.prototype.createEl = function(type, className) {
|
2557
2572
|
var el;
|
2573
|
+
|
2558
2574
|
if (className == null) {
|
2559
2575
|
className = "";
|
2560
2576
|
}
|
@@ -2565,18 +2581,21 @@ if ( typeof exports !== "undefined" ) {
|
|
2565
2581
|
|
2566
2582
|
BaseView.prototype.findEl = function(id) {
|
2567
2583
|
var _base;
|
2584
|
+
|
2568
2585
|
this.elements || (this.elements = {});
|
2569
2586
|
return (_base = this.elements)[id] || (_base[id] = document.getElementById("teaspoon-" + id));
|
2570
2587
|
};
|
2571
2588
|
|
2572
2589
|
BaseView.prototype.setText = function(id, value) {
|
2573
2590
|
var el;
|
2591
|
+
|
2574
2592
|
el = this.findEl(id);
|
2575
2593
|
return el.innerHTML = value;
|
2576
2594
|
};
|
2577
2595
|
|
2578
2596
|
BaseView.prototype.setHtml = function(id, value, add) {
|
2579
2597
|
var el;
|
2598
|
+
|
2580
2599
|
if (add == null) {
|
2581
2600
|
add = false;
|
2582
2601
|
}
|
@@ -2590,12 +2609,14 @@ if ( typeof exports !== "undefined" ) {
|
|
2590
2609
|
|
2591
2610
|
BaseView.prototype.setClass = function(id, value) {
|
2592
2611
|
var el;
|
2612
|
+
|
2593
2613
|
el = this.findEl(id);
|
2594
2614
|
return el.className = value;
|
2595
2615
|
};
|
2596
2616
|
|
2597
2617
|
BaseView.prototype.htmlSafe = function(str) {
|
2598
2618
|
var el;
|
2619
|
+
|
2599
2620
|
el = document.createElement("div");
|
2600
2621
|
el.appendChild(document.createTextNode(str));
|
2601
2622
|
return el.innerHTML;
|
@@ -2895,6 +2916,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2895
2916
|
|
2896
2917
|
SimpleProgressView.prototype.update = function(total, run) {
|
2897
2918
|
var percent;
|
2919
|
+
|
2898
2920
|
percent = total ? Math.ceil((run * 100) / total) : 0;
|
2899
2921
|
return this.setHtml("progress-percent", "" + percent + "%");
|
2900
2922
|
};
|
@@ -2920,6 +2942,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2920
2942
|
|
2921
2943
|
RadialProgressView.prototype.appendTo = function() {
|
2922
2944
|
var canvas, e;
|
2945
|
+
|
2923
2946
|
RadialProgressView.__super__.appendTo.apply(this, arguments);
|
2924
2947
|
this.size = 80;
|
2925
2948
|
try {
|
@@ -2935,6 +2958,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2935
2958
|
|
2936
2959
|
RadialProgressView.prototype.update = function(total, run) {
|
2937
2960
|
var half, percent;
|
2961
|
+
|
2938
2962
|
percent = total ? Math.ceil((run * 100) / total) : 0;
|
2939
2963
|
this.setHtml("progress-percent", "" + percent + "%");
|
2940
2964
|
if (!this.ctx) {
|
@@ -2979,7 +3003,7 @@ if ( typeof exports !== "undefined" ) {
|
|
2979
3003
|
classes.push("state-pending");
|
2980
3004
|
}
|
2981
3005
|
SpecView.__super__.build.call(this, classes.join(" "));
|
2982
|
-
this.el.innerHTML = "<a href=\"" + this.spec.link + "\">" + this.spec.description + "</a>";
|
3006
|
+
this.el.innerHTML = "<a href=\"" + this.spec.link + "\">" + (this.htmlSafe(this.spec.description)) + "</a>";
|
2983
3007
|
this.parentView = this.buildParent();
|
2984
3008
|
return this.parentView.append(this.el);
|
2985
3009
|
};
|
@@ -3045,7 +3069,7 @@ if ( typeof exports !== "undefined" ) {
|
|
3045
3069
|
FailureView.prototype.build = function() {
|
3046
3070
|
var error, html, _i, _len, _ref;
|
3047
3071
|
FailureView.__super__.build.call(this, "spec");
|
3048
|
-
html = "<h1 class=\"teaspoon-clearfix\"><a href=\"" + this.spec.link + "\">" + this.spec.fullDescription + "</a></h1>";
|
3072
|
+
html = "<h1 class=\"teaspoon-clearfix\"><a href=\"" + this.spec.link + "\">" + (this.htmlSafe(this.spec.fullDescription)) + "</a></h1>";
|
3049
3073
|
_ref = this.spec.errors();
|
3050
3074
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
3051
3075
|
error = _ref[_i];
|
@@ -3082,7 +3106,7 @@ if ( typeof exports !== "undefined" ) {
|
|
3082
3106
|
|
3083
3107
|
SuiteView.prototype.build = function() {
|
3084
3108
|
SuiteView.__super__.build.call(this, "suite");
|
3085
|
-
this.el.innerHTML = "<h1><a href=\"" + this.suite.link + "\">" + this.suite.description + "</a></h1>";
|
3109
|
+
this.el.innerHTML = "<h1><a href=\"" + this.suite.link + "\">" + (this.htmlSafe(this.suite.description)) + "</a></h1>";
|
3086
3110
|
this.parentView = this.buildParent();
|
3087
3111
|
return this.parentView.append(this.el);
|
3088
3112
|
};
|
@@ -3134,8 +3158,7 @@ if ( typeof exports !== "undefined" ) {
|
|
3134
3158
|
|
3135
3159
|
Teaspoon.Reporters.Console = (function() {
|
3136
3160
|
function Console() {
|
3137
|
-
this.reportRunnerResults = __bind(this.reportRunnerResults, this);
|
3138
|
-
this.start = new Teaspoon.Date();
|
3161
|
+
this.reportRunnerResults = __bind(this.reportRunnerResults, this); this.start = new Teaspoon.Date();
|
3139
3162
|
this.suites = {};
|
3140
3163
|
}
|
3141
3164
|
|
@@ -3149,6 +3172,7 @@ if ( typeof exports !== "undefined" ) {
|
|
3149
3172
|
|
3150
3173
|
Console.prototype.reportSuites = function() {
|
3151
3174
|
var index, suite, _i, _len, _ref, _results;
|
3175
|
+
|
3152
3176
|
_ref = this.spec.getParents();
|
3153
3177
|
_results = [];
|
3154
3178
|
for (index = _i = 0, _len = _ref.length; _i < _len; index = ++_i) {
|
@@ -3168,6 +3192,7 @@ if ( typeof exports !== "undefined" ) {
|
|
3168
3192
|
|
3169
3193
|
Console.prototype.reportSpecResults = function(spec) {
|
3170
3194
|
var result;
|
3195
|
+
|
3171
3196
|
this.spec = new Teaspoon.Spec(spec);
|
3172
3197
|
result = this.spec.result();
|
3173
3198
|
if (result.skipped) {
|
@@ -3192,6 +3217,7 @@ if ( typeof exports !== "undefined" ) {
|
|
3192
3217
|
|
3193
3218
|
Console.prototype.trackPending = function() {
|
3194
3219
|
var result;
|
3220
|
+
|
3195
3221
|
result = this.spec.result();
|
3196
3222
|
return this.log({
|
3197
3223
|
type: "spec",
|
@@ -3204,6 +3230,7 @@ if ( typeof exports !== "undefined" ) {
|
|
3204
3230
|
|
3205
3231
|
Console.prototype.trackFailure = function() {
|
3206
3232
|
var error, result, _i, _len, _ref, _results;
|
3233
|
+
|
3207
3234
|
result = this.spec.result();
|
3208
3235
|
_ref = this.spec.errors();
|
3209
3236
|
_results = [];
|
@@ -3254,8 +3281,7 @@ if ( typeof exports !== "undefined" ) {
|
|
3254
3281
|
__extends(Console, _super);
|
3255
3282
|
|
3256
3283
|
function Console(env) {
|
3257
|
-
this.reportSpecResults = __bind(this.reportSpecResults, this);
|
3258
|
-
Console.__super__.constructor.apply(this, arguments);
|
3284
|
+
this.reportSpecResults = __bind(this.reportSpecResults, this); Console.__super__.constructor.apply(this, arguments);
|
3259
3285
|
env.log(this.reportSpecResults);
|
3260
3286
|
env.testDone(this.reportSpecResults);
|
3261
3287
|
env.done(this.reportRunnerResults);
|
@@ -3390,7 +3416,7 @@ if ( typeof exports !== "undefined" ) {
|
|
3390
3416
|
FailureView.prototype.build = function() {
|
3391
3417
|
var error, html, _i, _len, _ref2;
|
3392
3418
|
FailureView.__super__.build.call(this, "spec");
|
3393
|
-
html = "<h1 class=\"teaspoon-clearfix\"><a href=\"" + this.spec.link + "\">" + this.spec.fullDescription + "</a></h1>";
|
3419
|
+
html = "<h1 class=\"teaspoon-clearfix\"><a href=\"" + this.spec.link + "\">" + (this.htmlSafe(this.spec.fullDescription)) + "</a></h1>";
|
3394
3420
|
_ref2 = this.spec.errors();
|
3395
3421
|
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
|
3396
3422
|
error = _ref2[_i];
|