Commit 2009c2f4 2009c2f43f10341eb354db25809c2e67a1109dd2 by Nicolas Perriault

fixes #77 - Tester#assertEquals outputs 'undefined' if no message provided

1 parent f2d7dd2e
...@@ -118,6 +118,7 @@ var Tester = function(casper, options) { ...@@ -118,6 +118,7 @@ var Tester = function(casper, options) {
118 */ 118 */
119 this.assertEquals = function assertEquals(subject, expected, message) { 119 this.assertEquals = function assertEquals(subject, expected, message) {
120 var eventName; 120 var eventName;
121 message = message || "";
121 if (this.testEquals(subject, expected)) { 122 if (this.testEquals(subject, expected)) {
122 eventName = "success"; 123 eventName = "success";
123 casper.echo(this.colorize(this.options.passText, 'INFO') + ' ' + this.formatMessage(message)); 124 casper.echo(this.colorize(this.options.passText, 'INFO') + ' ' + this.formatMessage(message));
......