Move away from should asserts to internal

This is needed as neither Sinon nor Chai support in-browser testing under IE.
This commit is contained in:
kpdecker
2013-12-23 00:48:28 -06:00
parent 0cf5657c43
commit 4942324250
7 changed files with 211 additions and 208 deletions
+6 -4
View File
@@ -1,12 +1,12 @@
global.should = require('should');
global.shouldCompileTo = function(string, hashOrArray, expected, message) {
shouldCompileToWithPartials(string, hashOrArray, false, expected, message);
};
global.shouldCompileToWithPartials = function(string, hashOrArray, partials, expected, message) {
var result = compileWithPartials(string, hashOrArray, partials);
result.should.equal(expected, "'" + expected + "' should === '" + result + "': " + message);
if (result !== expected) {
throw new Error("'" + expected + "' should === '" + result + "': " + message);
}
};
global.compileWithPartials = function(string, hashOrArray, partials) {
@@ -24,7 +24,9 @@ global.compileWithPartials = function(string, hashOrArray, partials) {
global.equals = global.equal = function(a, b, msg) {
a.should.equal(b, msg || '');
if (a !== b) {
throw new Error("'" + b + "' should === '" + a + "'" + (msg ? ": " + msg : ''));
}
};
global.shouldThrow = function(callback, type, msg) {