spec/javascripts/helpers/entityunit.js in entityjs-0.3.0 vs spec/javascripts/helpers/entityunit.js in entityjs-0.3.1
- old
+ new
@@ -37,9 +37,16 @@
}
expect(test).toMatch(reg)
}
+var indexOf = function(z, a,f){for(var c=z.length,r=-1,d=f>>>0;~(c-d);r=z[--c]===a?c:r);return r};
+
+function contains(array, item){
+ ok(indexOf(array, item) != -1);
+}
+
+
function called(value){
if(arguments.length == 1){
expect(value).toHaveBeenCalled()
} else {
var a = Array.prototype.slice.apply(arguments, 1)