Matchers & Matchers specs now broken up into individual files. There is now a requireMatchers jasmineRequire function to attach matchers properly.

This commit is contained in:
Davis W. Frank
2013-06-02 22:22:25 -07:00
parent 3271dc8838
commit d53002c63a
42 changed files with 1341 additions and 1173 deletions
+28
View File
@@ -0,0 +1,28 @@
getJasmineRequireObj().requireMatchers = function(jRequire) {
var availableMatchers = [
"toBe",
"toBeCloseTo",
"toBeDefined",
"toBeFalsy",
"toBeGreaterThan",
"toBeLessThan",
"toBeNaN",
"toBeNull",
"toBeTruthy",
"toBeUndefined",
"toContain",
"toEqual",
"toHaveBeenCalled",
"toHaveBeenCalledWith",
"toMatch",
"toThrow"
],
matchers = {};
for (var i = 0; i < availableMatchers.length; i++) {
var name = availableMatchers[i];
matchers[name] = jRequire[name]();
}
return matchers;
};