diff --git a/doc/files.html b/doc/files.html index 85dfc0d..e8c1783 100644 --- a/doc/files.html +++ b/doc/files.html @@ -258,7 +258,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
\ No newline at end of file diff --git a/doc/index.html b/doc/index.html index 8be315d..e743417 100644 --- a/doc/index.html +++ b/doc/index.html @@ -300,7 +300,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
\ No newline at end of file diff --git a/doc/symbols/_global_.html b/doc/symbols/_global_.html index 7737952..199cb75 100644 --- a/doc/symbols/_global_.html +++ b/doc/symbols/_global_.html @@ -908,7 +908,7 @@ A convenience method that allows existing specs to be disabled temporarily durin
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Block.html b/doc/symbols/jasmine.Block.html index 6661b63..e4eb3b7 100644 --- a/doc/symbols/jasmine.Block.html +++ b/doc/symbols/jasmine.Block.html @@ -339,7 +339,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Env.html b/doc/symbols/jasmine.Env.html index 28aafee..9f61e12 100644 --- a/doc/symbols/jasmine.Env.html +++ b/doc/symbols/jasmine.Env.html @@ -507,7 +507,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.JsApiReporter.html b/doc/symbols/jasmine.JsApiReporter.html index 97439bb..4c80855 100644 --- a/doc/symbols/jasmine.JsApiReporter.html +++ b/doc/symbols/jasmine.JsApiReporter.html @@ -316,7 +316,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.MultiReporter.html b/doc/symbols/jasmine.MultiReporter.html index b25fd0a..8b6b843 100644 --- a/doc/symbols/jasmine.MultiReporter.html +++ b/doc/symbols/jasmine.MultiReporter.html @@ -316,7 +316,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.NestedResults.html b/doc/symbols/jasmine.NestedResults.html index 8966bf0..2f5b813 100644 --- a/doc/symbols/jasmine.NestedResults.html +++ b/doc/symbols/jasmine.NestedResults.html @@ -700,7 +700,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Reporter.html b/doc/symbols/jasmine.Reporter.html index ace6d85..2c44e0f 100644 --- a/doc/symbols/jasmine.Reporter.html +++ b/doc/symbols/jasmine.Reporter.html @@ -316,7 +316,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Runner.html b/doc/symbols/jasmine.Runner.html index e360635..002c34f 100644 --- a/doc/symbols/jasmine.Runner.html +++ b/doc/symbols/jasmine.Runner.html @@ -418,7 +418,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Spec.html b/doc/symbols/jasmine.Spec.html index 4a36167..75f0370 100644 --- a/doc/symbols/jasmine.Spec.html +++ b/doc/symbols/jasmine.Spec.html @@ -396,7 +396,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Spy.html b/doc/symbols/jasmine.Spy.html index d41323b..a40031d 100644 --- a/doc/symbols/jasmine.Spy.html +++ b/doc/symbols/jasmine.Spy.html @@ -845,7 +845,7 @@ expect(foo.bar.callCount).toEqual(0);
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Suite.html b/doc/symbols/jasmine.Suite.html index 75a503f..ddff33f 100644 --- a/doc/symbols/jasmine.Suite.html +++ b/doc/symbols/jasmine.Suite.html @@ -436,7 +436,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.html b/doc/symbols/jasmine.html index 3f8d57f..89be636 100644 --- a/doc/symbols/jasmine.html +++ b/doc/symbols/jasmine.html @@ -728,7 +728,7 @@ Jasmine environment.
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.util.html b/doc/symbols/jasmine.util.html index 679cf42..c307aea 100644 --- a/doc/symbols/jasmine.util.html +++ b/doc/symbols/jasmine.util.html @@ -316,7 +316,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
diff --git a/doc/symbols/src/lib_jasmine-0.9.0.js.html b/doc/symbols/src/lib_jasmine-0.9.0.js.html index b077621..b5d20e0 100644 --- a/doc/symbols/src/lib_jasmine-0.9.0.js.html +++ b/doc/symbols/src/lib_jasmine-0.9.0.js.html @@ -529,7 +529,7 @@ 522 "major": 0, 523 "minor": 9, 524 "build": 0, -525 "revision": 1255470394 +525 "revision": 1255472107 526 }; 527 /** 528 * @namespace diff --git a/lib/jasmine-0.9.0.js b/lib/jasmine-0.9.0.js index 4d5e640..70d7086 100644 --- a/lib/jasmine-0.9.0.js +++ b/lib/jasmine-0.9.0.js @@ -1,6 +1,6 @@ /** * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework. - * + * * @namespace */ var jasmine = {}; @@ -14,7 +14,7 @@ jasmine.unimplementedMethod_ = function() { /** * Large or small values here may result in slow test running & "Too much recursion" errors - * + * */ jasmine.UPDATE_INTERVAL = 250; @@ -29,7 +29,14 @@ jasmine.UPDATE_INTERVAL = 250; jasmine.bindOriginal_ = function(base, name) { var original = base[name]; return function() { - return original.apply(base, arguments); + if (original.apply) { + return original.apply(base, arguments); + } else { + //IE support + if (base == window) { + return window[name].apply(window, arguments); + } + } }; }; @@ -71,10 +78,10 @@ jasmine.getEnv = function() { */ jasmine.isArray_ = function(value) { return value && - typeof value === 'object' && - typeof value.length === 'number' && - typeof value.splice === 'function' && - !(value.propertyIsEnumerable('length')); + typeof value === 'object' && + typeof value.length === 'number' && + typeof value.splice === 'function' && + !(value.propertyIsEnumerable('length')); }; /** @@ -123,7 +130,7 @@ jasmine.any = function(clazz) { * Spies are torn down at the end of every spec. * * Note: Do not call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj. - * + * * @example * // a stub * var myStub = jasmine.createSpy('myStub'); // can be used anywhere @@ -168,7 +175,8 @@ jasmine.Spy = function(name) { /** * The acutal function this spy stubs. */ - this.plan = function() {}; + this.plan = function() { + }; /** * Tracking of the most recent call to the spy. * @example @@ -199,7 +207,7 @@ jasmine.Spy = function(name) { * var foo = { * bar: function() { // do some stuff } * } - * + * * // defining a spy on an existing property: foo.bar * spyOn(foo, 'bar').andCallThrough(); */ @@ -302,11 +310,11 @@ jasmine.createSpy = function(name) { }; var spy = new jasmine.Spy(name); - - for(var prop in spy) { + + for (var prop in spy) { spyObj[prop] = spy[prop]; } - + spyObj.reset(); return spyObj; @@ -410,7 +418,7 @@ var waits = function(timeout) { /** * Waits for the latchFunction to return true before proceeding to the next runs()-defined block. - * + * * @param {Number} timeout * @param {Function} latchFunction * @param {String} message @@ -522,7 +530,7 @@ jasmine.version_= { "major": 0, "minor": 9, "build": 0, - "revision": 1255472107 + "revision": 1255654784 }; /** * @namespace @@ -1412,7 +1420,7 @@ jasmine.PrettyPrinter.prototype.format = function(value) { jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) { for (var property in obj) { if (property == '__Jasmine_been_here_before__') continue; - fn(property, obj.__lookupGetter__(property) != null); + fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) != null) : false); } }; @@ -2146,25 +2154,42 @@ jasmine.Clock = { if (jasmine.Clock.installed != jasmine.Clock.defaultFakeTimer) { throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()"); } - }, + }, installed: null }; jasmine.Clock.installed = jasmine.Clock.real; +//else for IE support window.setTimeout = function(funcToCall, millis) { - return jasmine.Clock.installed.setTimeout.apply(this, arguments); + if (jasmine.Clock.installed.setTimeout.apply) { + return jasmine.Clock.installed.setTimeout.apply(this, arguments); + } else { + return jasmine.Clock.installed.setTimeout(funcToCall, millis); + } }; window.setInterval = function(funcToCall, millis) { - return jasmine.Clock.installed.setInterval.apply(this, arguments); + if (jasmine.Clock.installed.setInterval.apply) { + return jasmine.Clock.installed.setInterval.apply(this, arguments); + } else { + return jasmine.Clock.installed.setInterval(funcToCall, millis); + } }; window.clearTimeout = function(timeoutKey) { - return jasmine.Clock.installed.clearTimeout.apply(this, arguments); + if (jasmine.Clock.installed.clearTimeout.apply) { + return jasmine.Clock.installed.clearTimeout.apply(this, arguments); + } else { + return jasmine.Clock.installed.clearTimeout(timeoutKey); + } }; window.clearInterval = function(timeoutKey) { - return jasmine.Clock.installed.clearInterval.apply(this, arguments); + if (jasmine.Clock.installed.clearTimeout.apply) { + return jasmine.Clock.installed.clearInterval.apply(this, arguments); + } else { + return jasmine.Clock.installed.clearInterval(timeoutKey); + } };