Commit e580b7d6 e580b7d65bd0c9ebdc9af9d436b51243c63e3390 by Nicolas Perriault

moved test results rendering to assert.js

1 parent 46210431
...@@ -29,5 +29,12 @@ phantom.Casper.extend({ ...@@ -29,5 +29,12 @@ phantom.Casper.extend({
29 29
30 assertEvalEquals: function(fn, expected, message) { 30 assertEvalEquals: function(fn, expected, message) {
31 return this.assertEquals(this.evaluate(fn), expected, message); 31 return this.assertEquals(this.evaluate(fn), expected, message);
32 },
33
34 renderResults: function() {
35 this.echo("==========================================");
36 var total = testResults.passed + testResults.failed;
37 this.echo(total + ' tests executed, ' + testResults.passed + ' passed, ' + testResults.failed + ' failed.');
38 this.exit();
32 } 39 }
33 }); 40 });
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -45,8 +45,5 @@ casper.then(function(self) { ...@@ -45,8 +45,5 @@ casper.then(function(self) {
45 }); 45 });
46 46
47 casper.run(function(self) { 47 casper.run(function(self) {
48 self.echo("=========================================="); 48 self.renderResults();
49 var total = testResults.passed + testResults.failed;
50 self.echo(total + ' tests executed, ' + testResults.passed + ' passed, ' + testResults.failed + ' failed.');
51 self.exit();
52 }); 49 });
......