Commit def87690 def87690b80948fe2b15e6d6d1ad43ca5051c664 by Nicolas Perriault

Merge remote-tracking branch 'cwinters/master'; commit '0643e910' into cwinters-52

2 parents 20b5c47d 0643e910
......@@ -146,9 +146,10 @@ var Tester = function(casper, options) {
*
* @param Function fn A function to be evaluated in remote DOM
* @param String message Test description
* @param Object context Object containing the parameters to inject into the function
*/
this.assertEval = function assertEval(fn, message) {
return this.assert(casper.evaluate(fn), message);
this.assertEval = function assertEval(fn, message, context) {
return this.assert(casper.evaluate(fn, context), message);
};
/**
......@@ -158,9 +159,10 @@ var Tester = function(casper, options) {
* @param Function fn The function to be evaluated in remote DOM
* @param Boolean expected The expected value
* @param String message Test description
* @param Object context Object containing the parameters to inject into the function
*/
this.assertEvalEquals = function assertEvalEquals(fn, expected, message) {
return this.assertEquals(casper.evaluate(fn), expected, message);
this.assertEvalEquals = function assertEvalEquals(fn, expected, message, context) {
return this.assertEquals(casper.evaluate(fn, context), expected, message);
};
/**
......@@ -174,6 +176,7 @@ var Tester = function(casper, options) {
return this.assert(casper.exists(selector), message);
};
/**
* Asserts that current HTTP status is the one passed as argument.
*
......