janitor_rails 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -345,8 +345,8 @@ window.Janitor.Stitch = {};
345
345
  _ref = this.tests;
346
346
  for (_i = 0, _len = _ref.length; _i < _len; _i++) {
347
347
  Test = _ref[_i];
348
- Test.bind('runCompleted', function(test_run) {
349
- return _this.handleCompletedRun(test_run);
348
+ Test.bind('runCompleted', function(testRun) {
349
+ return _this.handleCompletedRun(testRun);
350
350
  });
351
351
  Test.bind('completed', function() {
352
352
  return _this.checkComplete();
@@ -398,12 +398,12 @@ window.Janitor.Stitch = {};
398
398
  }
399
399
 
400
400
  _Class.prototype.run = function() {
401
- var Test, _i, _len, _ref, _results;
402
- new this.presenterClass(this.activeTests(), this.options);
403
- _ref = this.tests();
401
+ var Test, tests, _i, _len, _results;
402
+ tests = this.activeTests();
403
+ new this.presenterClass(tests, this.options);
404
404
  _results = [];
405
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
406
- Test = _ref[_i];
405
+ for (_i = 0, _len = tests.length; _i < _len; _i++) {
406
+ Test = tests[_i];
407
407
  _results.push(Test.runAll());
408
408
  }
409
409
  return _results;
@@ -412,11 +412,14 @@ window.Janitor.Stitch = {};
412
412
  _Class.prototype.activeTests = function() {
413
413
  var soloTest, tests;
414
414
  tests = this.tests();
415
- soloTest = null;
416
- tests.forEach(function(test) {
417
- if (test.solo) return soloTest = test;
418
- });
419
- return soloTest || tests;
415
+ soloTest = tests.filter(function(test) {
416
+ return test.solo;
417
+ })[0];
418
+ if (soloTest) {
419
+ return [soloTest];
420
+ } else {
421
+ return tests;
422
+ }
420
423
  };
421
424
 
422
425
  return _Class;
@@ -594,4 +597,4 @@ window.Janitor.Stitch = {};
594
597
 
595
598
  }).call(window.Janitor.Stitch);
596
599
  window.Janitor.TestCase = Janitor.Stitch.require('test_case'),
597
- window.Janitor.BrowserRunner = Janitor.Stitch.require('browser_runner')
600
+ window.Janitor.BrowserRunner = Janitor.Stitch.require('browser_runner')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: janitor_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: