diff --git a/Rakefile b/Rakefile index aa08aa5..8b4179d 100644 --- a/Rakefile +++ b/Rakefile @@ -61,7 +61,10 @@ jasmine.version_= { require 'jsdoc_helper' - JsdocHelper::Rake::Task.new(:lambda_jsdoc) + JsdocHelper::Rake::Task.new(:lambda_jsdoc) do |t| + t[:files] = jasmine_sources << 'lib/TrivialReporter.js' + p t.inspect + end Rake::Task[:lambda_jsdoc].invoke end diff --git a/doc/files.html b/doc/files.html index 6a28799..269d5e6 100644 --- a/doc/files.html +++ b/doc/files.html @@ -220,42 +220,6 @@ ul.inheritsList

File Index

-
-

lib/consolex.js

- -
- - - - -
-
-
- -
-

lib/jasmine-0.10.0.js

- -
- - - - -
-
-
- -
-

lib/json2.js

- -
- - - - -
-
-
-

lib/TrivialReporter.js

@@ -264,6 +228,222 @@ ul.inheritsList + +
+
+ +
+

src/base.js

+ +
+ + + + +
+
+
+ +
+

src/Block.js

+ +
+ + + + +
+
+
+ +
+

src/Env.js

+ +
+ + + + +
+
+
+ +
+

src/JsApiReporter.js

+ +
+ + + + +
+
+
+ +
+

src/Matchers.js

+ +
+ + + + +
+
+
+ +
+

src/mock-timeout.js

+ +
+ + + + +
+
+
+ +
+

src/MultiReporter.js

+ +
+ + + + +
+
+
+ +
+

src/NestedResults.js

+ +
+ + + + +
+
+
+ +
+

src/PrettyPrinter.js

+ +
+ + + + +
+
+
+ +
+

src/Queue.js

+ +
+ + + + +
+
+
+ +
+

src/Reporter.js

+ +
+ + + + +
+
+
+ +
+

src/Reporters.js

+ +
+ + + + +
+
+
+ +
+

src/Runner.js

+ +
+ + + + +
+
+
+ +
+

src/Spec.js

+ +
+ + + + +
+
+
+ +
+

src/Suite.js

+ +
+ + + + +
+
+
+ +
+

src/util.js

+ +
+ + + + +
+
+
+ +
+

src/WaitsBlock.js

+ +
+ + + + +
+
+
+ +
+

src/WaitsForBlock.js

+ +
+ + + +

@@ -272,7 +452,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:39 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST)
\ No newline at end of file diff --git a/doc/index.html b/doc/index.html index 24756e1..8324565 100644 --- a/doc/index.html +++ b/doc/index.html @@ -308,7 +308,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:39 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST)
\ No newline at end of file diff --git a/doc/symbols/_global_.html b/doc/symbols/_global_.html index 9529625..c4f4228 100644 --- a/doc/symbols/_global_.html +++ b/doc/symbols/_global_.html @@ -391,7 +391,7 @@ ul.inheritsList Used for restoring any state that is hijacked during spec execution.
- Defined in: jasmine-0.10.0.js. + Defined in: base.js. @@ -432,7 +432,7 @@ Used for restoring any state that is hijacked during spec execution. Used for spec setup, including validating assumptions.
- Defined in: jasmine-0.10.0.js. + Defined in: base.js. @@ -475,7 +475,7 @@ are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be of setup in some tests.
- Defined in: jasmine-0.10.0.js. + Defined in: base.js. @@ -529,7 +529,7 @@ It is passed an Object that is the actual value and should chain to one of the m jasmine.Matchers functions.
- Defined in: jasmine-0.10.0.js. + Defined in: base.js. @@ -570,7 +570,7 @@ jasmine.Matchers functions. // TODO: pending tests
- Defined in: jasmine-0.10.0.js. + Defined in: base.js. @@ -621,7 +621,7 @@ jasmine.Matchers functions. Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs.
- Defined in: jasmine-0.10.0.js. + Defined in: base.js. @@ -660,7 +660,7 @@ jasmine.Matchers functions. Function that installs a spy on an existing object's method name. Used within a Spec to create a spy.
- Defined in: jasmine-0.10.0.js. + Defined in: base.js. @@ -727,7 +727,7 @@ spyOn(foo, 'not'); // actual foo.not will not be called, execution stops Waits for a timeout before moving to the next runs()-defined block.
- Defined in: jasmine-0.10.0.js. + Defined in: base.js. @@ -766,7 +766,7 @@ spyOn(foo, 'not'); // actual foo.not will not be called, execution stops Waits for the latchFunction to return true before proceeding to the next runs()-defined block.
- Defined in: jasmine-0.10.0.js. + Defined in: base.js. @@ -817,7 +817,7 @@ spyOn(foo, 'not'); // actual foo.not will not be called, execution stops Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development.
- Defined in: jasmine-0.10.0.js. + Defined in: base.js. @@ -864,7 +864,7 @@ spyOn(foo, 'not'); // actual foo.not will not be called, execution stops A convenience method that allows existing specs to be disabled temporarily during development.
- Defined in: jasmine-0.10.0.js. + Defined in: base.js. @@ -910,7 +910,7 @@ A convenience method that allows existing specs to be disabled temporarily durin
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:38 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.Block.html b/doc/symbols/jasmine.Block.html index 56af348..3dbc184 100644 --- a/doc/symbols/jasmine.Block.html +++ b/doc/symbols/jasmine.Block.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: Block.js.

@@ -341,7 +341,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:38 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.Env.html b/doc/symbols/jasmine.Env.html index 6e7c920..f9a75a7 100644 --- a/doc/symbols/jasmine.Env.html +++ b/doc/symbols/jasmine.Env.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: Env.js.

@@ -509,7 +509,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:38 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.JsApiReporter.html b/doc/symbols/jasmine.JsApiReporter.html index eef87b6..83ebeb3 100644 --- a/doc/symbols/jasmine.JsApiReporter.html +++ b/doc/symbols/jasmine.JsApiReporter.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: JsApiReporter.js.

@@ -318,7 +318,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:38 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.Matchers.html b/doc/symbols/jasmine.Matchers.html index 5942dce..85b8394 100644 --- a/doc/symbols/jasmine.Matchers.html +++ b/doc/symbols/jasmine.Matchers.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: Matchers.js.

@@ -255,7 +255,7 @@ ul.inheritsList  
- jasmine.Matchers(env, actual, results) + jasmine.Matchers(env, actual, spec)
@@ -458,7 +458,7 @@ ul.inheritsList
- jasmine.Matchers(env, actual, results) + jasmine.Matchers(env, actual, spec)
@@ -486,7 +486,7 @@ ul.inheritsList
- {jasmine.NestedResults} results + {jasmine.Spec} spec
@@ -877,7 +877,7 @@ a pattern or a String.
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:38 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.MultiReporter.html b/doc/symbols/jasmine.MultiReporter.html index 70254a7..9a4e1dc 100644 --- a/doc/symbols/jasmine.MultiReporter.html +++ b/doc/symbols/jasmine.MultiReporter.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: MultiReporter.js.

@@ -318,7 +318,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:38 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.NestedResults.html b/doc/symbols/jasmine.NestedResults.html index d80a7fe..139f9a3 100644 --- a/doc/symbols/jasmine.NestedResults.html +++ b/doc/symbols/jasmine.NestedResults.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: NestedResults.js.

@@ -702,7 +702,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:38 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.Reporter.html b/doc/symbols/jasmine.Reporter.html index c432098..ecba5b4 100644 --- a/doc/symbols/jasmine.Reporter.html +++ b/doc/symbols/jasmine.Reporter.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: Reporter.js.

@@ -318,7 +318,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:38 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.Runner.html b/doc/symbols/jasmine.Runner.html index e4d24ae..6e17061 100644 --- a/doc/symbols/jasmine.Runner.html +++ b/doc/symbols/jasmine.Runner.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: Runner.js.

@@ -329,7 +329,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:39 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.Spec.html b/doc/symbols/jasmine.Spec.html index 5b8b08b..1cc26ec 100644 --- a/doc/symbols/jasmine.Spec.html +++ b/doc/symbols/jasmine.Spec.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: Spec.js.

@@ -398,7 +398,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:39 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.Spy.html b/doc/symbols/jasmine.Spy.html index 82e4c0a..9944c65 100644 --- a/doc/symbols/jasmine.Spy.html +++ b/doc/symbols/jasmine.Spy.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: base.js.

@@ -847,7 +847,7 @@ expect(foo.bar.callCount).toEqual(0);
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:39 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.Suite.html b/doc/symbols/jasmine.Suite.html index 9033a0a..19a098a 100644 --- a/doc/symbols/jasmine.Suite.html +++ b/doc/symbols/jasmine.Suite.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: Suite.js.

@@ -347,7 +347,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:39 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.html b/doc/symbols/jasmine.html index 65b2497..4b0d823 100644 --- a/doc/symbols/jasmine.html +++ b/doc/symbols/jasmine.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: base.js.

@@ -282,9 +282,9 @@ ul.inheritsList <static>  
- jasmine.details + jasmine.DEFAULT_UPDATE_INTERVAL
-
+
Default interval for event loop yields.
@@ -292,9 +292,9 @@ ul.inheritsList <static>  
- jasmine.UPDATE_INTERVAL + jasmine.details
-
Large or small values here may result in slow test running & "Too much recursion" errors
+
@@ -428,15 +428,15 @@ Jasmine environment.
Field Detail - +
<static> - jasmine.details + jasmine.DEFAULT_UPDATE_INTERVAL
- + Default interval for event loop yields. Small values here may result in slow test running. Zero means no updates until all tests have completed.
@@ -450,15 +450,15 @@ Jasmine environment.
- +
<static> - jasmine.UPDATE_INTERVAL + jasmine.details
- Large or small values here may result in slow test running & "Too much recursion" errors +
@@ -735,6 +735,9 @@ Jasmine environment.
Base class for pretty printing for expectation results. +
+ Defined in: PrettyPrinter.js. +
@@ -762,7 +765,7 @@ Jasmine environment.
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:38 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST)
diff --git a/doc/symbols/jasmine.util.html b/doc/symbols/jasmine.util.html index fbe6efd..d4b261b 100644 --- a/doc/symbols/jasmine.util.html +++ b/doc/symbols/jasmine.util.html @@ -236,7 +236,7 @@ ul.inheritsList -
Defined in: jasmine-0.10.0.js. +
Defined in: util.js.

@@ -318,7 +318,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:39 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST)
diff --git a/doc/symbols/src/lib_TrivialReporter.js.html b/doc/symbols/src/lib_TrivialReporter.js.html index df0b881..700119e 100644 --- a/doc/symbols/src/lib_TrivialReporter.js.html +++ b/doc/symbols/src/lib_TrivialReporter.js.html @@ -97,30 +97,35 @@ 90 var result = resultItems[i]; 91 if (result.passed && !result.passed()) { 92 var resultMessageDiv = this.createDom('div', {className: 'resultMessage fail'}); - 93 resultMessageDiv.innerHTML = result.message; // todo: lame; mend - 94 specDiv.appendChild(resultMessageDiv); - 95 specDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack)); - 96 } - 97 } - 98 this.suiteDivs[spec.suite.getFullName()].appendChild(specDiv); - 99 }; -100 -101 jasmine.TrivialReporter.prototype.log = function() { -102 console.log.apply(console, arguments); -103 }; -104 -105 jasmine.TrivialReporter.prototype.getLocation = function() { -106 return this.document.location; -107 }; -108 -109 jasmine.TrivialReporter.prototype.specFilter = function(spec) { -110 var paramMap = {}; -111 var params = this.getLocation().search.substring(1).split('&'); -112 for (var i = 0; i < params.length; i++) { -113 var p = params[i].split('='); -114 paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]); -115 } -116 -117 if (!paramMap["spec"]) return true; -118 return spec.getFullName().indexOf(paramMap["spec"]) == 0; -119 }; \ No newline at end of file + 93 + 94 var expectationMessage = "Expected " + jasmine.pp(result.actual) + " " + result.matcherName; + 95 if ("expected" in result) { + 96 expectationMessage += " " + jasmine.pp(result.expected); + 97 } + 98 resultMessageDiv.innerHTML = expectationMessage; // todo: lame; mend + 99 specDiv.appendChild(resultMessageDiv); +100 specDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack)); +101 } +102 } +103 this.suiteDivs[spec.suite.getFullName()].appendChild(specDiv); +104 }; +105 +106 jasmine.TrivialReporter.prototype.log = function() { +107 console.log.apply(console, arguments); +108 }; +109 +110 jasmine.TrivialReporter.prototype.getLocation = function() { +111 return this.document.location; +112 }; +113 +114 jasmine.TrivialReporter.prototype.specFilter = function(spec) { +115 var paramMap = {}; +116 var params = this.getLocation().search.substring(1).split('&'); +117 for (var i = 0; i < params.length; i++) { +118 var p = params[i].split('='); +119 paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]); +120 } +121 +122 if (!paramMap["spec"]) return true; +123 return spec.getFullName().indexOf(paramMap["spec"]) == 0; +124 }; \ No newline at end of file diff --git a/doc/symbols/src/lib_consolex.js.html b/doc/symbols/src/lib_consolex.js.html deleted file mode 100644 index ebd3594..0000000 --- a/doc/symbols/src/lib_consolex.js.html +++ /dev/null @@ -1,35 +0,0 @@ -
  1 /** Console X
-  2 * http://github.com/deadlyicon/consolex.js
-  3 *
-  4 * By Jared Grippe <jared@jaredgrippe.com>
-  5 *
-  6 * Copyright (c) 2009 Jared Grippe
-  7 * Licensed under the MIT license.
-  8 *
-  9 * consolex avoids ever having to see javascript bugs in browsers that do not implement the entire
- 10 * firebug console suit
- 11 *
- 12 */
- 13 (function(window) {
- 14   window.console || (window.console = {});
- 15 
- 16   var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
- 17   "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
- 18 
- 19   function emptyFunction(){}
- 20 
- 21   for (var i = 0; i < names.length; ++i){
- 22     window.console[names[i]] || (window.console[names[i]] = emptyFunction);
- 23     if (typeof window.console[names[i]] !== 'function')
- 24       window.console[names[i]] = (function(method) {
- 25           return function(){ return Function.prototype.apply.apply(method, [console,arguments]); };
- 26         })(window.console[names[i]]);
- 27   }
- 28 })(this);
\ No newline at end of file diff --git a/doc/symbols/src/lib_jasmine-0.10.0.js.html b/doc/symbols/src/lib_jasmine-0.10.0.js.html deleted file mode 100644 index 290bf04..0000000 --- a/doc/symbols/src/lib_jasmine-0.10.0.js.html +++ /dev/null @@ -1,2302 +0,0 @@ -
  1 /**
-  2  * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
-  3  *
-  4  * @namespace
-  5  */
-  6 var jasmine = {};
-  7 
-  8 /**
-  9  * @private
- 10  */
- 11 jasmine.unimplementedMethod_ = function() {
- 12   throw new Error("unimplemented method");
- 13 };
- 14 
- 15 /**
- 16  * Large or small values here may result in slow test running & "Too much recursion" errors
- 17  *
- 18  */
- 19 jasmine.UPDATE_INTERVAL = 250;
- 20 
- 21 /**
- 22  * Allows for bound functions to be comapred.  Internal use only.
- 23  *
- 24  * @ignore
- 25  * @private
- 26  * @param base {Object} bound 'this' for the function
- 27  * @param name {Function} function to find
- 28  */
- 29 jasmine.bindOriginal_ = function(base, name) {
- 30   var original = base[name];
- 31   if (original.apply) {
- 32     return function() {
- 33       return original.apply(base, arguments);
- 34     };
- 35   } else {
- 36     // IE support
- 37     return window[name];
- 38   }
- 39 };
- 40 
- 41 jasmine.setTimeout = jasmine.bindOriginal_(window, 'setTimeout');
- 42 jasmine.clearTimeout = jasmine.bindOriginal_(window, 'clearTimeout');
- 43 jasmine.setInterval = jasmine.bindOriginal_(window, 'setInterval');
- 44 jasmine.clearInterval = jasmine.bindOriginal_(window, 'clearInterval');
- 45 
- 46 jasmine.MessageResult = function(text) {
- 47   this.type = 'MessageResult';
- 48   this.text = text;
- 49   this.trace = new Error(); // todo: test better
- 50 };
- 51 
- 52 jasmine.ExpectationResult = function(params) {
- 53   this.type = 'ExpectationResult';
- 54   this.matcherName = params.matcherName;
- 55   this.passed_ = params.passed;
- 56   this.expected = params.expected;
- 57   this.actual = params.actual;
- 58 
- 59   /** @deprecated */
- 60   this.details = params.details;
- 61   
- 62   this.message = this.passed_ ? 'Passed.' : params.message;
- 63   this.trace = this.passed_ ? '' : new Error(this.message);
- 64 };
- 65 
- 66 jasmine.ExpectationResult.prototype.passed = function () {
- 67   return this.passed_;
- 68 };
- 69 
- 70 /**
- 71  * Getter for the Jasmine environment. Ensures one gets created
- 72  */
- 73 jasmine.getEnv = function() {
- 74   return jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env();
- 75 };
- 76 
- 77 /**
- 78  * @ignore
- 79  * @private
- 80  * @param value
- 81  * @returns {Boolean}
- 82  */
- 83 jasmine.isArray_ = function(value) {
- 84   return value &&
- 85          typeof value === 'object' &&
- 86          typeof value.length === 'number' &&
- 87          typeof value.splice === 'function' &&
- 88          !(value.propertyIsEnumerable('length'));
- 89 };
- 90 
- 91 /**
- 92  * Pretty printer for expecations.  Takes any object and turns it into a human-readable string.
- 93  *
- 94  * @param value {Object} an object to be outputted
- 95  * @returns {String}
- 96  */
- 97 jasmine.pp = function(value) {
- 98   var stringPrettyPrinter = new jasmine.StringPrettyPrinter();
- 99   stringPrettyPrinter.format(value);
-100   return stringPrettyPrinter.string;
-101 };
-102 
-103 /**
-104  * Returns true if the object is a DOM Node.
-105  *
-106  * @param {Object} obj object to check
-107  * @returns {Boolean}
-108  */
-109 jasmine.isDomNode = function(obj) {
-110   return obj['nodeType'] > 0;
-111 };
-112 
-113 /**
-114  * Returns a matchable 'generic' object of the class type.  For use in expecations of type when values don't matter.
-115  *
-116  * @example
-117  * // don't care about which function is passed in, as long as it's a function
-118  * expect(mySpy).wasCalledWith(jasmine.any(Function));
-119  *
-120  * @param {Class} clazz
-121  * @returns matchable object of the type clazz
-122  */
-123 jasmine.any = function(clazz) {
-124   return new jasmine.Matchers.Any(clazz);
-125 };
-126 
-127 /**
-128  * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
-129  *
-130  * Spies should be created in test setup, before expectations.  They can then be checked, using the standard Jasmine
-131  * expectation syntax. Spies can be checked if they were called or not and what the calling params were.
-132  *
-133  * A Spy has the following mehtod: wasCalled, callCount, mostRecentCall, and argsForCall (see docs)
-134  * Spies are torn down at the end of every spec.
-135  *
-136  * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
-137  *
-138  * @example
-139  * // a stub
-140  * var myStub = jasmine.createSpy('myStub');  // can be used anywhere
-141  *
-142  * // spy example
-143  * var foo = {
-144  *   not: function(bool) { return !bool; }
-145  * }
-146  *
-147  * // actual foo.not will not be called, execution stops
-148  * spyOn(foo, 'not');
-149 
-150  // foo.not spied upon, execution will continue to implementation
-151  * spyOn(foo, 'not').andCallThrough();
-152  *
-153  * // fake example
-154  * var foo = {
-155  *   not: function(bool) { return !bool; }
-156  * }
-157  *
-158  * // foo.not(val) will return val
-159  * spyOn(foo, 'not').andCallFake(function(value) {return value;});
-160  *
-161  * // mock example
-162  * foo.not(7 == 7);
-163  * expect(foo.not).wasCalled();
-164  * expect(foo.not).wasCalledWith(true);
-165  *
-166  * @constructor
-167  * @see spyOn, jasmine.createSpy, jasmine.createSpyObj
-168  * @param {String} name
-169  */
-170 jasmine.Spy = function(name) {
-171   /**
-172    * The name of the spy, if provided.
-173    */
-174   this.identity = name || 'unknown';
-175   /**
-176    *  Is this Object a spy?
-177    */
-178   this.isSpy = true;
-179   /**
-180    * The acutal function this spy stubs.
-181    */
-182   this.plan = function() {
-183   };
-184   /**
-185    * Tracking of the most recent call to the spy.
-186    * @example
-187    * var mySpy = jasmine.createSpy('foo');
-188    * mySpy(1, 2);
-189    * mySpy.mostRecentCall.args = [1, 2];
-190    */
-191   this.mostRecentCall = {};
-192 
-193   /**
-194    * Holds arguments for each call to the spy, indexed by call count
-195    * @example
-196    * var mySpy = jasmine.createSpy('foo');
-197    * mySpy(1, 2);
-198    * mySpy(7, 8);
-199    * mySpy.mostRecentCall.args = [7, 8];
-200    * mySpy.argsForCall[0] = [1, 2];
-201    * mySpy.argsForCall[1] = [7, 8];
-202    */
-203   this.argsForCall = [];
-204   this.calls = [];
-205 };
-206 
-207 /**
-208  * Tells a spy to call through to the actual implemenatation.
-209  *
-210  * @example
-211  * var foo = {
-212  *   bar: function() { // do some stuff }
-213  * }
-214  *
-215  * // defining a spy on an existing property: foo.bar
-216  * spyOn(foo, 'bar').andCallThrough();
-217  */
-218 jasmine.Spy.prototype.andCallThrough = function() {
-219   this.plan = this.originalValue;
-220   return this;
-221 };
-222 
-223 /**
-224  * For setting the return value of a spy.
-225  *
-226  * @example
-227  * // defining a spy from scratch: foo() returns 'baz'
-228  * var foo = jasmine.createSpy('spy on foo').andReturn('baz');
-229  *
-230  * // defining a spy on an existing property: foo.bar() returns 'baz'
-231  * spyOn(foo, 'bar').andReturn('baz');
-232  *
-233  * @param {Object} value
-234  */
-235 jasmine.Spy.prototype.andReturn = function(value) {
-236   this.plan = function() {
-237     return value;
-238   };
-239   return this;
-240 };
-241 
-242 /**
-243  * For throwing an exception when a spy is called.
-244  *
-245  * @example
-246  * // defining a spy from scratch: foo() throws an exception w/ message 'ouch'
-247  * var foo = jasmine.createSpy('spy on foo').andThrow('baz');
-248  *
-249  * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
-250  * spyOn(foo, 'bar').andThrow('baz');
-251  *
-252  * @param {String} exceptionMsg
-253  */
-254 jasmine.Spy.prototype.andThrow = function(exceptionMsg) {
-255   this.plan = function() {
-256     throw exceptionMsg;
-257   };
-258   return this;
-259 };
-260 
-261 /**
-262  * Calls an alternate implementation when a spy is called.
-263  *
-264  * @example
-265  * var baz = function() {
-266  *   // do some stuff, return something
-267  * }
-268  * // defining a spy from scratch: foo() calls the function baz
-269  * var foo = jasmine.createSpy('spy on foo').andCall(baz);
-270  *
-271  * // defining a spy on an existing property: foo.bar() calls an anonymnous function
-272  * spyOn(foo, 'bar').andCall(function() { return 'baz';} );
-273  *
-274  * @param {Function} fakeFunc
-275  */
-276 jasmine.Spy.prototype.andCallFake = function(fakeFunc) {
-277   this.plan = fakeFunc;
-278   return this;
-279 };
-280 
-281 /**
-282  * Resets all of a spy's the tracking variables so that it can be used again.
-283  *
-284  * @example
-285  * spyOn(foo, 'bar');
-286  *
-287  * foo.bar();
-288  *
-289  * expect(foo.bar.callCount).toEqual(1);
-290  *
-291  * foo.bar.reset();
-292  *
-293  * expect(foo.bar.callCount).toEqual(0);
-294  */
-295 jasmine.Spy.prototype.reset = function() {
-296   this.wasCalled = false;
-297   this.callCount = 0;
-298   this.argsForCall = [];
-299   this.calls = [];
-300   this.mostRecentCall = {};
-301 };
-302 
-303 jasmine.createSpy = function(name) {
-304 
-305   var spyObj = function() {
-306     spyObj.wasCalled = true;
-307     spyObj.callCount++;
-308     var args = jasmine.util.argsToArray(arguments);
-309     spyObj.mostRecentCall.object = this;
-310     spyObj.mostRecentCall.args = args;
-311     spyObj.argsForCall.push(args);
-312     spyObj.calls.push({object: this, args: args});
-313     return spyObj.plan.apply(this, arguments);
-314   };
-315 
-316   var spy = new jasmine.Spy(name);
-317 
-318   for (var prop in spy) {
-319     spyObj[prop] = spy[prop];
-320   }
-321 
-322   spyObj.reset();
-323 
-324   return spyObj;
-325 };
-326 
-327 /**
-328  * Creates a more complicated spy: an Object that has every property a function that is a spy.  Used for stubbing something
-329  * large in one call.
-330  *
-331  * @param {String} baseName name of spy class
-332  * @param {Array} methodNames array of names of methods to make spies
-333  */
-334 jasmine.createSpyObj = function(baseName, methodNames) {
-335   var obj = {};
-336   for (var i = 0; i < methodNames.length; i++) {
-337     obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]);
-338   }
-339   return obj;
-340 };
-341 
-342 jasmine.log = function(message) {
-343   jasmine.getEnv().currentSpec.log(message);
-344 };
-345 
-346 /**
-347  * Function that installs a spy on an existing object's method name.  Used within a Spec to create a spy.
-348  *
-349  * @example
-350  * // spy example
-351  * var foo = {
-352  *   not: function(bool) { return !bool; }
-353  * }
-354  * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
-355  *
-356  * @see jasmine.createSpy
-357  * @param obj
-358  * @param methodName
-359  * @returns a Jasmine spy that can be chained with all spy methods
-360  */
-361 var spyOn = function(obj, methodName) {
-362   return jasmine.getEnv().currentSpec.spyOn(obj, methodName);
-363 };
-364 
-365 /**
-366  * Creates a Jasmine spec that will be added to the current suite.
-367  *
-368  * // TODO: pending tests
-369  *
-370  * @example
-371  * it('should be true', function() {
-372  *   expect(true).toEqual(true);
-373  * });
-374  *
-375  * @param {String} desc description of this specification
-376  * @param {Function} func defines the preconditions and expectations of the spec
-377  */
-378 var it = function(desc, func) {
-379   return jasmine.getEnv().it(desc, func);
-380 };
-381 
-382 /**
-383  * Creates a <em>disabled</em> Jasmine spec.
-384  *
-385  * A convenience method that allows existing specs to be disabled temporarily during development.
-386  *
-387  * @param {String} desc description of this specification
-388  * @param {Function} func defines the preconditions and expectations of the spec
-389  */
-390 var xit = function(desc, func) {
-391   return jasmine.getEnv().xit(desc, func);
-392 };
-393 
-394 /**
-395  * Starts a chain for a Jasmine expectation.
-396  *
-397  * It is passed an Object that is the actual value and should chain to one of the many
-398  * jasmine.Matchers functions.
-399  *
-400  * @param {Object} actual Actual value to test against and expected value
-401  */
-402 var expect = function(actual) {
-403   return jasmine.getEnv().currentSpec.expect(actual);
-404 };
-405 
-406 /**
-407  * Defines part of a jasmine spec.  Used in cominbination with waits or waitsFor in asynchrnous specs.
-408  *
-409  * @param {Function} func Function that defines part of a jasmine spec.
-410  */
-411 var runs = function(func) {
-412   jasmine.getEnv().currentSpec.runs(func);
-413 };
-414 
-415 /**
-416  * Waits for a timeout before moving to the next runs()-defined block.
-417  * @param {Number} timeout
-418  */
-419 var waits = function(timeout) {
-420   jasmine.getEnv().currentSpec.waits(timeout);
-421 };
-422 
-423 /**
-424  * Waits for the latchFunction to return true before proceeding to the next runs()-defined block.
-425  *
-426  * @param {Number} timeout
-427  * @param {Function} latchFunction
-428  * @param {String} message
-429  */
-430 var waitsFor = function(timeout, latchFunction, message) {
-431   jasmine.getEnv().currentSpec.waitsFor(timeout, latchFunction, message);
-432 };
-433 
-434 /**
-435  * A function that is called before each spec in a suite.
-436  *
-437  * Used for spec setup, including validating assumptions.
-438  *
-439  * @param {Function} beforeEachFunction
-440  */
-441 var beforeEach = function(beforeEachFunction) {
-442   jasmine.getEnv().beforeEach(beforeEachFunction);
-443 };
-444 
-445 /**
-446  * A function that is called after each spec in a suite.
-447  *
-448  * Used for restoring any state that is hijacked during spec execution.
-449  *
-450  * @param {Function} afterEachFunction
-451  */
-452 var afterEach = function(afterEachFunction) {
-453   jasmine.getEnv().afterEach(afterEachFunction);
-454 };
-455 
-456 /**
-457  * Defines a suite of specifications.
-458  *
-459  * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
-460  * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
-461  * of setup in some tests.
-462  *
-463  * @example
-464  * // TODO: a simple suite
-465  *
-466  * // TODO: a simple suite with a nested describe block
-467  *
-468  * @param {String} description A string, usually the class under test.
-469  * @param {Function} specDefinitions function that defines several specs.
-470  */
-471 var describe = function(description, specDefinitions) {
-472   return jasmine.getEnv().describe(description, specDefinitions);
-473 };
-474 
-475 /**
-476  * Disables a suite of specifications.  Used to disable some suites in a file, or files, temporarily during development.
-477  *
-478  * @param {String} description A string, usually the class under test.
-479  * @param {Function} specDefinitions function that defines several specs.
-480  */
-481 var xdescribe = function(description, specDefinitions) {
-482   return jasmine.getEnv().xdescribe(description, specDefinitions);
-483 };
-484 
-485 
-486 jasmine.XmlHttpRequest = XMLHttpRequest;
-487 
-488 // Provide the XMLHttpRequest class for IE 5.x-6.x:
-489 if (typeof XMLHttpRequest == "undefined") jasmine.XmlHttpRequest = function() {
-490   try {
-491     return new ActiveXObject("Msxml2.XMLHTTP.6.0");
-492   } catch(e) {
-493   }
-494   try {
-495     return new ActiveXObject("Msxml2.XMLHTTP.3.0");
-496   } catch(e) {
-497   }
-498   try {
-499     return new ActiveXObject("Msxml2.XMLHTTP");
-500   } catch(e) {
-501   }
-502   try {
-503     return new ActiveXObject("Microsoft.XMLHTTP");
-504   } catch(e) {
-505   }
-506   throw new Error("This browser does not support XMLHttpRequest.");
-507 };
-508 
-509 /**
-510  * Adds suite files to an HTML document so that they are executed, thus adding them to the current
-511  * Jasmine environment.
-512  *
-513  * @param {String} url path to the file to include
-514  * @param {Boolean} opt_global
-515  */
-516 jasmine.include = function(url, opt_global) {
-517   if (opt_global) {
-518     document.write('<script type="text/javascript" src="' + url + '"></' + 'script>');
-519   } else {
-520     var xhr;
-521     try {
-522       xhr = new jasmine.XmlHttpRequest();
-523       xhr.open("GET", url, false);
-524       xhr.send(null);
-525     } catch(e) {
-526       throw new Error("couldn't fetch " + url + ": " + e);
-527     }
-528 
-529     return eval(xhr.responseText);
-530   }
-531 };
-532 
-533 jasmine.version_= {
-534   "major": 0,
-535   "minor": 10,
-536   "build": 0,
-537   "revision": 1257050413
-538   };
-539 /**
-540  * @namespace
-541  */
-542 jasmine.util = {};
-543 
-544 /**
-545  * Declare that a child class inherite it's prototype from the parent class.
-546  *
-547  * @private
-548  * @param {Function} childClass
-549  * @param {Function} parentClass
-550  */
-551 jasmine.util.inherit = function(childClass, parentClass) {
-552   var subclass = function() {
-553   };
-554   subclass.prototype = parentClass.prototype;
-555   childClass.prototype = new subclass;
-556 };
-557 
-558 jasmine.util.formatException = function(e) {
-559   var lineNumber;
-560   if (e.line) {
-561     lineNumber = e.line;
-562   }
-563   else if (e.lineNumber) {
-564     lineNumber = e.lineNumber;
-565   }
-566 
-567   var file;
-568 
-569   if (e.sourceURL) {
-570     file = e.sourceURL;
-571   }
-572   else if (e.fileName) {
-573     file = e.fileName;
-574   }
-575 
-576   var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();
-577 
-578   if (file && lineNumber) {
-579     message += ' in ' + file + ' (line ' + lineNumber + ')';
-580   }
-581 
-582   return message;
-583 };
-584 
-585 jasmine.util.htmlEscape = function(str) {
-586   if (!str) return str;
-587   return str.replace(/&/g, '&')
-588     .replace(/</g, '<')
-589     .replace(/>/g, '>');
-590 };
-591 
-592 jasmine.util.argsToArray = function(args) {
-593   var arrayOfArgs = [];
-594   for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);
-595   return arrayOfArgs;
-596 };
-597 
-598 jasmine.util.extend = function(destination, source) {
-599   for (var property in source) destination[property] = source[property];
-600   return destination;
-601 };
-602 
-603 /**
-604  * Environment for Jasmine
-605  *
-606  * @constructor
-607  */
-608 jasmine.Env = function() {
-609   this.currentSpec = null;
-610   this.currentSuite = null;
-611   this.currentRunner_ = new jasmine.Runner(this);
-612 
-613   this.reporter = new jasmine.MultiReporter();
-614 
-615   this.updateInterval = jasmine.UPDATE_INTERVAL
-616   this.lastUpdate = 0;
-617   this.specFilter = function() {
-618     return true;
-619   };
-620 
-621   this.nextSpecId_ = 0;
-622   this.nextSuiteId_ = 0;
-623   this.equalityTesters_ = [];
-624 };
-625 
-626 
-627 jasmine.Env.prototype.setTimeout = jasmine.setTimeout;
-628 jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout;
-629 jasmine.Env.prototype.setInterval = jasmine.setInterval;
-630 jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
-631 
-632 /**
-633  * @returns an object containing jasmine version build info, if set.
-634  */
-635 jasmine.Env.prototype.version = function () {
-636   if (jasmine.version_) {
-637     return jasmine.version_;
-638   } else {
-639     throw new Error('Version not set');
-640   }
-641 };
-642 
-643 /**
-644  * @returns a sequential integer starting at 0
-645  */
-646 jasmine.Env.prototype.nextSpecId = function () {
-647   return this.nextSpecId_++;
-648 };
-649 
-650 /**
-651  * @returns a sequential integer starting at 0
-652  */
-653 jasmine.Env.prototype.nextSuiteId = function () {
-654   return this.nextSuiteId_++;
-655 };
-656 
-657 /**
-658  * Register a reporter to receive status updates from Jasmine.
-659  * @param {jasmine.Reporter} reporter An object which will receive status updates.
-660  */
-661 jasmine.Env.prototype.addReporter = function(reporter) {
-662   this.reporter.addReporter(reporter);
-663 };
-664 
-665 jasmine.Env.prototype.execute = function() {
-666   this.currentRunner_.execute();
-667 };
-668 
-669 jasmine.Env.prototype.describe = function(description, specDefinitions) {
-670   var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite);
-671 
-672   var parentSuite = this.currentSuite;
-673   if (parentSuite) {
-674     parentSuite.add(suite);
-675   } else {
-676     this.currentRunner_.add(suite);
-677   }
-678 
-679   this.currentSuite = suite;
-680 
-681   specDefinitions.call(suite);
-682 
-683   this.currentSuite = parentSuite;
-684 
-685   return suite;
-686 };
-687 
-688 jasmine.Env.prototype.beforeEach = function(beforeEachFunction) {
-689   if (this.currentSuite) {
-690     this.currentSuite.beforeEach(beforeEachFunction);
-691   } else {
-692     this.currentRunner_.beforeEach(beforeEachFunction);
-693   }
-694 };
-695 
-696 jasmine.Env.prototype.currentRunner = function () {
-697   return this.currentRunner_;
-698 };
-699 
-700 jasmine.Env.prototype.afterEach = function(afterEachFunction) {
-701   if (this.currentSuite) {
-702     this.currentSuite.afterEach(afterEachFunction);
-703   } else {
-704     this.currentRunner_.afterEach(afterEachFunction);
-705   }
-706 
-707 };
-708 
-709 jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) {
-710   return {
-711     execute: function() {
-712     }
-713   };
-714 };
-715 
-716 jasmine.Env.prototype.it = function(description, func) {
-717   var spec = new jasmine.Spec(this, this.currentSuite, description);
-718   this.currentSuite.add(spec);
-719   this.currentSpec = spec;
-720 
-721   if (func) {
-722     spec.runs(func);
-723   }
-724 
-725   return spec;
-726 };
-727 
-728 jasmine.Env.prototype.xit = function(desc, func) {
-729   return {
-730     id: this.nextSpecId(),
-731     runs: function() {
-732     }
-733   };
-734 };
-735 
-736 jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
-737   if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
-738     return true;
-739   }
-740 
-741   a.__Jasmine_been_here_before__ = b;
-742   b.__Jasmine_been_here_before__ = a;
-743 
-744   var hasKey = function(obj, keyName) {
-745     return obj != null && obj[keyName] !== undefined;
-746   };
-747 
-748   for (var property in b) {
-749     if (!hasKey(a, property) && hasKey(b, property)) {
-750       mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
-751     }
-752   }
-753   for (property in a) {
-754     if (!hasKey(b, property) && hasKey(a, property)) {
-755       mismatchKeys.push("expected missing key '" + property + "', but present in actual.");
-756     }
-757   }
-758   for (property in b) {
-759     if (property == '__Jasmine_been_here_before__') continue;
-760     if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) {
-761       mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual.");
-762     }
-763   }
-764 
-765   if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) {
-766     mismatchValues.push("arrays were not the same length");
-767   }
-768 
-769   delete a.__Jasmine_been_here_before__;
-770   delete b.__Jasmine_been_here_before__;
-771   return (mismatchKeys.length == 0 && mismatchValues.length == 0);
-772 };
-773 
-774 jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
-775   mismatchKeys = mismatchKeys || [];
-776   mismatchValues = mismatchValues || [];
-777 
-778   if (a === b) return true;
-779 
-780   if (a === undefined || a === null || b === undefined || b === null) {
-781     return (a == undefined && b == undefined);
-782   }
-783 
-784   if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) {
-785     return a === b;
-786   }
-787 
-788   if (a instanceof Date && b instanceof Date) {
-789     return a.getTime() == b.getTime();
-790   }
-791 
-792   if (a instanceof jasmine.Matchers.Any) {
-793     return a.matches(b);
-794   }
-795 
-796   if (b instanceof jasmine.Matchers.Any) {
-797     return b.matches(a);
-798   }
-799 
-800   if (typeof a === "object" && typeof b === "object") {
-801     return this.compareObjects_(a, b, mismatchKeys, mismatchValues);
-802   }
-803 
-804   for (var i = 0; i < this.equalityTesters_.length; i++) {
-805     var equalityTester = this.equalityTesters_[i];
-806     var result = equalityTester(a, b, this, mismatchKeys, mismatchValues);
-807     if (result !== undefined) return result;
-808   }
-809 
-810   //Straight check
-811   return (a === b);
-812 };
-813 
-814 jasmine.Env.prototype.contains_ = function(haystack, needle) {
-815   if (jasmine.isArray_(haystack)) {
-816     for (var i = 0; i < haystack.length; i++) {
-817       if (this.equals_(haystack[i], needle)) return true;
-818     }
-819     return false;
-820   }
-821   return haystack.indexOf(needle) >= 0;
-822 };
-823 
-824 jasmine.Env.prototype.addEqualityTester = function(equalityTester) {
-825   this.equalityTesters_.push(equalityTester);
-826 };
-827 /** No-op base class for Jasmine reporters.
-828  *
-829  * @constructor
-830  */
-831 jasmine.Reporter = function() {
-832 };
-833 
-834 //noinspection JSUnusedLocalSymbols
-835 jasmine.Reporter.prototype.reportRunnerStarting = function(runner) {
-836 };
-837 
-838 //noinspection JSUnusedLocalSymbols
-839 jasmine.Reporter.prototype.reportRunnerResults = function(runner) {
-840 };
-841 
-842 //noinspection JSUnusedLocalSymbols
-843 jasmine.Reporter.prototype.reportSuiteResults = function(suite) {
-844 };
-845 
-846 //noinspection JSUnusedLocalSymbols
-847 jasmine.Reporter.prototype.reportSpecResults = function(spec) {
-848 };
-849 
-850 //noinspection JSUnusedLocalSymbols
-851 jasmine.Reporter.prototype.log = function(str) {
-852 };
-853 
-854 /**
-855  * Blocks are functions with executable code that make up a spec.
-856  *
-857  * @constructor
-858  * @param {jasmine.Env} env
-859  * @param {Function} func
-860  * @param {jasmine.Spec} spec
-861  */
-862 jasmine.Block = function(env, func, spec) {
-863   this.env = env;
-864   this.func = func;
-865   this.spec = spec;
-866 };
-867 
-868 jasmine.Block.prototype.execute = function(onComplete) {  
-869   try {
-870     this.func.apply(this.spec);
-871   } catch (e) {
-872     this.spec.fail(e);
-873   }
-874   onComplete();
-875 };
-876 /** JavaScript API reporter.
-877  *
-878  * @constructor
-879  */
-880 jasmine.JsApiReporter = function() {
-881   this.started = false;
-882   this.finished = false;
-883   this.suites_ = [];
-884   this.results_ = {};
-885 };
-886 
-887 jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) {
-888   this.started = true;
-889   var suites = runner.suites();
-890   for (var i = 0; i < suites.length; i++) {
-891     var suite = suites[i];
-892     this.suites_.push(this.summarize_(suite));
-893   }
-894 };
-895 
-896 jasmine.JsApiReporter.prototype.suites = function() {
-897   return this.suites_;
-898 };
-899 
-900 jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) {
-901   var isSuite = suiteOrSpec instanceof jasmine.Suite
-902   var summary = {
-903     id: suiteOrSpec.id,
-904     name: suiteOrSpec.description,
-905     type: isSuite ? 'suite' : 'spec',
-906     children: []
-907   };
-908   if (isSuite) {
-909     var specs = suiteOrSpec.specs();
-910     for (var i = 0; i < specs.length; i++) {
-911       summary.children.push(this.summarize_(specs[i]));
-912     }
-913   }
-914   return summary;
-915 };
-916 
-917 jasmine.JsApiReporter.prototype.results = function() {
-918   return this.results_;
-919 };
-920 
-921 jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) {
-922   return this.results_[specId];
-923 };
-924 
-925 //noinspection JSUnusedLocalSymbols
-926 jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) {
-927   this.finished = true;
-928 };
-929 
-930 //noinspection JSUnusedLocalSymbols
-931 jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) {
-932 };
-933 
-934 //noinspection JSUnusedLocalSymbols
-935 jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) {
-936   this.results_[spec.id] = {
-937     messages: spec.results().getItems(),
-938     result: spec.results().failedCount > 0 ? "failed" : "passed"
-939   };
-940 };
-941 
-942 //noinspection JSUnusedLocalSymbols
-943 jasmine.JsApiReporter.prototype.log = function(str) {
-944 };
-945 
-946 jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){
-947   var results = {};
-948   for (var i = 0; i < specIds.length; i++) {
-949     var specId = specIds[i];
-950     results[specId] = this.summarizeResult_(this.results_[specId]);
-951   }
-952   return results;
-953 };
-954 
-955 jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
-956   var summaryMessages = [];
-957   for (var messageIndex in result.messages) {
-958     var resultMessage = result.messages[messageIndex];
-959     summaryMessages.push({
-960       text: resultMessage.text,
-961       passed: resultMessage.passed ? resultMessage.passed() : true,
-962       type: resultMessage.type,
-963       message: resultMessage.message,
-964       trace: {
-965         stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : undefined
-966       }
-967     });
-968   };
-969 
-970   var summaryResult = {
-971     result : result.result,
-972     messages : summaryMessages
-973   };
-974 
-975   return summaryResult;
-976 };
-977 
-978 /**
-979  * @constructor
-980  * @param {jasmine.Env} env
-981  * @param actual
-982  * @param {jasmine.NestedResults} results
-983  */
-984 jasmine.Matchers = function(env, actual, spec) {
-985   this.env = env;
-986   this.actual = actual;
-987   this.spec = spec;
-988 };
-989 
-990 jasmine.Matchers.pp = function(str) {
-991   return jasmine.util.htmlEscape(jasmine.pp(str));
-992 };
-993 
-994 jasmine.Matchers.prototype.report = function(result, failing_message, details) {
-995   var expectationResult = new jasmine.ExpectationResult({
-996     passed: result,
-997     message: failing_message,
-998     details: details
-999   });
-1000   this.spec.addMatcherResult(expectationResult);
-1001   return result;
-1002 };
-1003 
-1004 jasmine.Matchers.matcherFn_ = function(matcherName, options) {
-1005   return function () {
-1006     jasmine.util.extend(this, options);
-1007     var matcherArgs = jasmine.util.argsToArray(arguments);
-1008     var args = [this.actual].concat(matcherArgs);
-1009     var result = options.test.apply(this, args);
-1010     var message;
-1011     if (!result) {
-1012       message = options.message.apply(this, args);
-1013     }
-1014     var expectationResult = new jasmine.ExpectationResult({
-1015       matcherName: matcherName,
-1016       passed: result,
-1017       expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0],
-1018       actual: this.actual,
-1019       message: message
-1020     });
-1021     this.spec.addMatcherResult(expectationResult);
-1022     return result;
-1023   };
-1024 };
-1025 
-1026 
-1027 
-1028 
-1029 /**
-1030  * toBe: compares the actual to the expected using ===
-1031  * @param expected
-1032  */
-1033 
-1034 jasmine.Matchers.prototype.toBe = jasmine.Matchers.matcherFn_('toBe', {
-1035   test: function (actual, expected) {
-1036     return actual === expected;
-1037   },
-1038   message: function(actual, expected) {
-1039     return "Expected " + jasmine.pp(actual) + " to be " + jasmine.pp(expected);
-1040   }
-1041 });
-1042 
-1043 /**
-1044  * toNotBe: compares the actual to the expected using !==
-1045  * @param expected
-1046  */
-1047 jasmine.Matchers.prototype.toNotBe = jasmine.Matchers.matcherFn_('toNotBe', {
-1048   test: function (actual, expected) {
-1049     return actual !== expected;
-1050   },
-1051   message: function(actual, expected) {
-1052     return "Expected " + jasmine.pp(actual) + " to not be " + jasmine.pp(expected);
-1053   }
-1054 });
-1055 
-1056 /**
-1057  * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.
-1058  *
-1059  * @param expected
-1060  */
-1061 
-1062 jasmine.Matchers.prototype.toEqual = jasmine.Matchers.matcherFn_('toEqual', {
-1063   test: function (actual, expected) {
-1064     return this.env.equals_(actual, expected);
-1065   },
-1066   message: function(actual, expected) {
-1067     return "Expected " + jasmine.pp(actual) + " to equal " + jasmine.pp(expected);
-1068   }
-1069 });
-1070 
-1071 /**
-1072  * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual
-1073  * @param expected
-1074  */
-1075 jasmine.Matchers.prototype.toNotEqual = jasmine.Matchers.matcherFn_('toNotEqual', {
-1076   test: function (actual, expected) {
-1077     return !this.env.equals_(actual, expected);
-1078   },
-1079   message: function(actual, expected) {
-1080     return "Expected " + jasmine.pp(actual) + " to not equal " + jasmine.pp(expected);
-1081   }
-1082 });
-1083 
-1084 /**
-1085  * Matcher that compares the actual to the expected using a regular expression.  Constructs a RegExp, so takes
-1086  * a pattern or a String.
-1087  *
-1088  * @param reg_exp
-1089  */
-1090 jasmine.Matchers.prototype.toMatch = jasmine.Matchers.matcherFn_('toMatch', {
-1091   test: function(actual, expected) {
-1092     return new RegExp(expected).test(actual);
-1093   },
-1094   message: function(actual, expected) {
-1095     return jasmine.pp(actual) + " does not match the regular expression " + new RegExp(expected).toString();
-1096   }
-1097 });
-1098 
-1099 /**
-1100  * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
-1101  * @param reg_exp
-1102  */
-1103 
-1104 jasmine.Matchers.prototype.toNotMatch = jasmine.Matchers.matcherFn_('toNotMatch', {
-1105   test: function(actual, expected) {
-1106     return !(new RegExp(expected).test(actual));
-1107   },
-1108   message: function(actual, expected) {
-1109     return jasmine.pp(actual) + " should not match " + new RegExp(expected).toString();
-1110   }
-1111 });
-1112 
-1113 /**
-1114  * Matcher that compares the acutal to undefined.
-1115  */
-1116 
-1117 jasmine.Matchers.prototype.toBeDefined = jasmine.Matchers.matcherFn_('toBeDefined', {
-1118   test: function(actual) {
-1119     return (actual !== undefined);
-1120   },
-1121   message: function() {
-1122     return 'Expected actual to not be undefined.';
-1123   }
-1124 });
-1125 
-1126 /**
-1127  * Matcher that compares the acutal to undefined.
-1128  */
-1129 
-1130 jasmine.Matchers.prototype.toBeUndefined = jasmine.Matchers.matcherFn_('toBeUndefined', {
-1131   test: function(actual) {
-1132     return (actual === undefined);
-1133   },
-1134   message: function(actual) {
-1135     return 'Expected ' + jasmine.pp(actual) + ' to be undefined.';
-1136   }
-1137 });
-1138 
-1139 /**
-1140  * Matcher that compares the actual to null.
-1141  *
-1142  */
-1143 jasmine.Matchers.prototype.toBeNull = jasmine.Matchers.matcherFn_('toBeNull', {
-1144   test: function(actual) {
-1145     return (actual === null);
-1146   },
-1147   message: function(actual) {
-1148     return 'Expected ' + jasmine.pp(actual) + ' to be null.';
-1149   }
-1150 });
-1151 
-1152 /**
-1153  * Matcher that boolean not-nots the actual.
-1154  */
-1155 jasmine.Matchers.prototype.toBeTruthy = jasmine.Matchers.matcherFn_('toBeTruthy', {
-1156   test: function(actual) {
-1157     return !!actual;
-1158   },
-1159   message: function() {
-1160     return 'Expected actual to be truthy';
-1161   }
-1162 });
-1163 
-1164 
-1165 /**
-1166  * Matcher that boolean nots the actual.
-1167  */
-1168 jasmine.Matchers.prototype.toBeFalsy = jasmine.Matchers.matcherFn_('toBeFalsy', {
-1169   test: function(actual) {
-1170     return !actual;
-1171   },
-1172   message: function(actual) {
-1173     return 'Expected ' + jasmine.pp(actual) + ' to be falsy';
-1174   }
-1175 });
-1176 
-1177 /**
-1178  * Matcher that checks to see if the acutal, a Jasmine spy, was called.
-1179  */
-1180 
-1181 jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.matcherFn_('wasCalled', {
-1182   getActual_: function() {
-1183     var args = jasmine.util.argsToArray(arguments);
-1184     if (args.length > 1) {
-1185       throw(new Error('wasCalled does not take arguments, use wasCalledWith'));
-1186     }
-1187     return args.splice(0, 1)[0];
-1188   },
-1189   test: function() {
-1190     var actual = this.getActual_.apply(this, arguments);
-1191     if (!actual || !actual.isSpy) {
-1192       return false;
-1193     }
-1194     return actual.wasCalled;
-1195   },
-1196   message: function() {
-1197     var actual = this.getActual_.apply(this, arguments);
-1198     if (!actual || !actual.isSpy) {
-1199       return 'Actual is not a spy.';
-1200     }
-1201     return "Expected spy " + actual.identity + " to have been called.";
-1202   }
-1203 });
-1204 
-1205 /**
-1206  * Matcher that checks to see if the acutal, a Jasmine spy, was not called.
-1207  */
-1208 jasmine.Matchers.prototype.wasNotCalled = jasmine.Matchers.matcherFn_('wasNotCalled', {
-1209   getActual_: function() {
-1210     var args = jasmine.util.argsToArray(arguments);
-1211     return args.splice(0, 1)[0];
-1212   },
-1213   test: function() {
-1214     var actual = this.getActual_.apply(this, arguments);
-1215     if (!actual || !actual.isSpy) {
-1216       return false;
-1217     }
-1218     return !actual.wasCalled;
-1219   },
-1220   message: function() {
-1221     var actual = this.getActual_.apply(this, arguments);
-1222     if (!actual || !actual.isSpy) {
-1223       return 'Actual is not a spy.';
-1224     }
-1225     return "Expected spy " + actual.identity + " to not have been called.";
-1226   }
-1227 });
-1228 
-1229 jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.matcherFn_('wasCalledWith', {
-1230   test: function() {
-1231     var args = jasmine.util.argsToArray(arguments);
-1232     var actual = args.splice(0, 1)[0];
-1233     if (!actual || !actual.isSpy) {
-1234       return false;
-1235     }
-1236     return this.env.contains_(actual.argsForCall, args);
-1237   },
-1238   message: function() {
-1239     var args = jasmine.util.argsToArray(arguments);
-1240     var actual = args.splice(0, 1)[0];
-1241     var message;
-1242     if (!actual || !actual.isSpy) {
-1243       message = 'Actual is not a spy';
-1244     } else {
-1245       message = "Expected spy to have been called with " + jasmine.pp(args) + " but was called with " + actual.argsForCall;
-1246     }
-1247     return message;
-1248   }
-1249 });
-1250 
-1251 /**
-1252  * Matcher that checks to see if the acutal, a Jasmine spy, was called with a set of parameters.
-1253  *
-1254  * @example
-1255  *
-1256  */
-1257 
-1258 /**
-1259  * Matcher that checks that the expected item is an element in the actual Array.
-1260  *
-1261  * @param {Object} item
-1262  */
-1263 
-1264 jasmine.Matchers.prototype.toContain = jasmine.Matchers.matcherFn_('toContain', {
-1265   test: function(actual, expected) {
-1266     return this.env.contains_(actual, expected);
-1267   },
-1268   message: function(actual, expected) {
-1269     return 'Expected ' + jasmine.pp(actual) + ' to contain ' + jasmine.pp(expected);
-1270   }
-1271 });
-1272 
-1273 /**
-1274  * Matcher that checks that the expected item is NOT an element in the actual Array.
-1275  *
-1276  * @param {Object} item
-1277  */
-1278 jasmine.Matchers.prototype.toNotContain = jasmine.Matchers.matcherFn_('toNotContain', {
-1279   test: function(actual, expected) {
-1280     return !this.env.contains_(actual, expected);
-1281   },
-1282   message: function(actual, expected) {
-1283     return 'Expected ' + jasmine.pp(actual) + ' to not contain ' + jasmine.pp(expected);
-1284   }
-1285 });
-1286 
-1287 jasmine.Matchers.prototype.toBeLessThan = jasmine.Matchers.matcherFn_('toBeLessThan', {
-1288   test: function(actual, expected) {
-1289     return actual < expected;
-1290   },
-1291   message: function(actual, expected) {
-1292     return 'Expected ' + jasmine.pp(actual) + ' to be less than ' + jasmine.pp(expected);
-1293   }
-1294 });
-1295 
-1296 jasmine.Matchers.prototype.toBeGreaterThan = jasmine.Matchers.matcherFn_('toBeGreaterThan', {
-1297   test: function(actual, expected) {
-1298     return actual > expected;
-1299   },
-1300   message: function(actual, expected) {
-1301     return 'Expected ' + jasmine.pp(actual) + ' to be greater than ' + jasmine.pp(expected);
-1302   }
-1303 });
-1304 
-1305 /**
-1306  * Matcher that checks that the expected exception was thrown by the actual.
-1307  *
-1308  * @param {String} expectedException
-1309  */
-1310 jasmine.Matchers.prototype.toThrow = jasmine.Matchers.matcherFn_('toThrow', {
-1311   getException_: function(actual, expected) {
-1312     var exception;
-1313     if (typeof actual != 'function') {
-1314       throw new Error('Actual is not a function');
-1315     }
-1316     try {
-1317       actual();
-1318     } catch (e) {
-1319       exception = e;
-1320     }
-1321     return exception;
-1322   },
-1323   test: function(actual, expected) {
-1324     var result = false;
-1325     var exception = this.getException_(actual, expected);
-1326     if (exception) {
-1327       result = (expected === undefined || this.env.equals_(exception.message || exception, expected.message || expected));
-1328     }
-1329     return result;
-1330   },
-1331   message: function(actual, expected) {
-1332     var exception = this.getException_(actual, expected);
-1333     if (exception && (expected === undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) {
-1334       return ["Expected function to throw", expected.message || expected, ", but it threw", exception.message || exception  ].join(' ');
-1335     } else {
-1336       return "Expected function to throw an exception.";
-1337     }
-1338   }
-1339 });
-1340 
-1341 jasmine.Matchers.Any = function(expectedClass) {
-1342   this.expectedClass = expectedClass;
-1343 };
-1344 
-1345 jasmine.Matchers.Any.prototype.matches = function(other) {
-1346   if (this.expectedClass == String) {
-1347     return typeof other == 'string' || other instanceof String;
-1348   }
-1349 
-1350   if (this.expectedClass == Number) {
-1351     return typeof other == 'number' || other instanceof Number;
-1352   }
-1353 
-1354   if (this.expectedClass == Function) {
-1355     return typeof other == 'function' || other instanceof Function;
-1356   }
-1357 
-1358   if (this.expectedClass == Object) {
-1359     return typeof other == 'object';
-1360   }
-1361 
-1362   return other instanceof this.expectedClass;
-1363 };
-1364 
-1365 jasmine.Matchers.Any.prototype.toString = function() {
-1366   return '<jasmine.any(' + this.expectedClass + ')>';
-1367 };
-1368 
-1369 /**
-1370  * @constructor
-1371  */
-1372 jasmine.MultiReporter = function() {
-1373   this.subReporters_ = [];
-1374 };
-1375 jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter);
-1376 
-1377 jasmine.MultiReporter.prototype.addReporter = function(reporter) {
-1378   this.subReporters_.push(reporter);
-1379 };
-1380 
-1381 (function() {
-1382   var functionNames = ["reportRunnerStarting", "reportRunnerResults", "reportSuiteResults", "reportSpecResults", "log"];
-1383   for (var i = 0; i < functionNames.length; i++) {
-1384     var functionName = functionNames[i];
-1385     jasmine.MultiReporter.prototype[functionName] = (function(functionName) {
-1386       return function() {
-1387         for (var j = 0; j < this.subReporters_.length; j++) {
-1388           var subReporter = this.subReporters_[j];
-1389           if (subReporter[functionName]) {
-1390             subReporter[functionName].apply(subReporter, arguments);
-1391           }
-1392         }
-1393       };
-1394     })(functionName);
-1395   }
-1396 })();
-1397 /**
-1398  * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults
-1399  *
-1400  * @constructor
-1401  */
-1402 jasmine.NestedResults = function() {
-1403   /**
-1404    * The total count of results
-1405    */
-1406   this.totalCount = 0;
-1407   /**
-1408    * Number of passed results
-1409    */
-1410   this.passedCount = 0;
-1411   /**
-1412    * Number of failed results
-1413    */
-1414   this.failedCount = 0;
-1415   /**
-1416    * Was this suite/spec skipped?
-1417    */
-1418   this.skipped = false;
-1419   /**
-1420    * @ignore
-1421    */
-1422   this.items_ = [];
-1423 };
-1424 
-1425 /**
-1426  * Roll up the result counts.
-1427  *
-1428  * @param result
-1429  */
-1430 jasmine.NestedResults.prototype.rollupCounts = function(result) {
-1431   this.totalCount += result.totalCount;
-1432   this.passedCount += result.passedCount;
-1433   this.failedCount += result.failedCount;
-1434 };
-1435 
-1436 /**
-1437  * Tracks a result's message.
-1438  * @param message
-1439  */
-1440 jasmine.NestedResults.prototype.log = function(message) {
-1441   this.items_.push(new jasmine.MessageResult(message));
-1442 };
-1443 
-1444 /**
-1445  * Getter for the results: message & results.
-1446  */
-1447 jasmine.NestedResults.prototype.getItems = function() {
-1448   return this.items_;
-1449 };
-1450 
-1451 /**
-1452  * Adds a result, tracking counts (total, passed, & failed)
-1453  * @param {jasmine.ExpectationResult|jasmine.NestedResults} result
-1454  */
-1455 jasmine.NestedResults.prototype.addResult = function(result) {
-1456   if (result.type != 'MessageResult') {
-1457     if (result.items_) {
-1458       this.rollupCounts(result);
-1459     } else {
-1460       this.totalCount++;
-1461       if (result.passed()) {
-1462         this.passedCount++;
-1463       } else {
-1464         this.failedCount++;
-1465       }
-1466     }
-1467   }
-1468   this.items_.push(result);
-1469 };
-1470 
-1471 /**
-1472  * @returns {Boolean} True if <b>everything</b> below passed
-1473  */
-1474 jasmine.NestedResults.prototype.passed = function() {
-1475   return this.passedCount === this.totalCount;
-1476 };
-1477 /**
-1478  * Base class for pretty printing for expectation results.
-1479  */
-1480 jasmine.PrettyPrinter = function() {
-1481   this.ppNestLevel_ = 0;
-1482 };
-1483 
-1484 /**
-1485  * Formats a value in a nice, human-readable string.
-1486  *
-1487  * @param value
-1488  * @returns {String}
-1489  */
-1490 jasmine.PrettyPrinter.prototype.format = function(value) {
-1491   if (this.ppNestLevel_ > 40) {
-1492     //    return '(jasmine.pp nested too deeply!)';
-1493     throw new Error('jasmine.PrettyPrinter: format() nested too deeply!');
-1494   }
-1495 
-1496   this.ppNestLevel_++;
-1497   try {
-1498     if (value === undefined) {
-1499       this.emitScalar('undefined');
-1500     } else if (value === null) {
-1501       this.emitScalar('null');
-1502     } else if (value.navigator && value.frames && value.setTimeout) {
-1503       this.emitScalar('<window>');
-1504     } else if (value instanceof jasmine.Matchers.Any) {
-1505       this.emitScalar(value.toString());
-1506     } else if (typeof value === 'string') {
-1507       this.emitString(value);
-1508     } else if (typeof value === 'function') {
-1509       this.emitScalar('Function');
-1510     } else if (typeof value.nodeType === 'number') {
-1511       this.emitScalar('HTMLNode');
-1512     } else if (value instanceof Date) {
-1513       this.emitScalar('Date(' + value + ')');
-1514     } else if (value.__Jasmine_been_here_before__) {
-1515       this.emitScalar('<circular reference: ' + (jasmine.isArray_(value) ? 'Array' : 'Object') + '>');
-1516     } else if (jasmine.isArray_(value) || typeof value == 'object') {
-1517       value.__Jasmine_been_here_before__ = true;
-1518       if (jasmine.isArray_(value)) {
-1519         this.emitArray(value);
-1520       } else {
-1521         this.emitObject(value);
-1522       }
-1523       delete value.__Jasmine_been_here_before__;
-1524     } else {
-1525       this.emitScalar(value.toString());
-1526     }
-1527   } finally {
-1528     this.ppNestLevel_--;
-1529   }
-1530 };
-1531 
-1532 jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
-1533   for (var property in obj) {
-1534     if (property == '__Jasmine_been_here_before__') continue;
-1535     fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) != null) : false);
-1536   }
-1537 };
-1538 
-1539 jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_;
-1540 jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_;
-1541 jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_;
-1542 jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_;
-1543 
-1544 jasmine.StringPrettyPrinter = function() {
-1545   jasmine.PrettyPrinter.call(this);
-1546 
-1547   this.string = '';
-1548 };
-1549 jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter);
-1550 
-1551 jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) {
-1552   this.append(value);
-1553 };
-1554 
-1555 jasmine.StringPrettyPrinter.prototype.emitString = function(value) {
-1556   this.append("'" + value + "'");
-1557 };
-1558 
-1559 jasmine.StringPrettyPrinter.prototype.emitArray = function(array) {
-1560   this.append('[ ');
-1561   for (var i = 0; i < array.length; i++) {
-1562     if (i > 0) {
-1563       this.append(', ');
-1564     }
-1565     this.format(array[i]);
-1566   }
-1567   this.append(' ]');
-1568 };
-1569 
-1570 jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) {
-1571   var self = this;
-1572   this.append('{ ');
-1573   var first = true;
-1574 
-1575   this.iterateObject(obj, function(property, isGetter) {
-1576     if (first) {
-1577       first = false;
-1578     } else {
-1579       self.append(', ');
-1580     }
-1581 
-1582     self.append(property);
-1583     self.append(' : ');
-1584     if (isGetter) {
-1585       self.append('<getter>');
-1586     } else {
-1587       self.format(obj[property]);
-1588     }
-1589   });
-1590 
-1591   this.append(' }');
-1592 };
-1593 
-1594 jasmine.StringPrettyPrinter.prototype.append = function(value) {
-1595   this.string += value;
-1596 };
-1597 jasmine.Queue = function(env) {
-1598   this.env = env;
-1599   this.blocks = [];
-1600   this.running = false;
-1601   this.index = 0;
-1602   this.offset = 0;
-1603 };
-1604 
-1605 jasmine.Queue.prototype.addBefore = function(block) {
-1606   this.blocks.unshift(block);
-1607 };
-1608 
-1609 jasmine.Queue.prototype.add = function(block) {
-1610   this.blocks.push(block);
-1611 };
-1612 
-1613 jasmine.Queue.prototype.insertNext = function(block) {
-1614   this.blocks.splice((this.index + this.offset + 1), 0, block);
-1615   this.offset++;
-1616 };
-1617 
-1618 jasmine.Queue.prototype.start = function(onComplete) {
-1619   this.running = true;
-1620   this.onComplete = onComplete;
-1621   this.next_();
-1622 };
-1623 
-1624 jasmine.Queue.prototype.isRunning = function() {
-1625   return this.running;
-1626 };
-1627 
-1628 jasmine.Queue.LOOP_DONT_RECURSE = true;
-1629 
-1630 jasmine.Queue.prototype.next_ = function() {
-1631   var self = this;
-1632   var goAgain = true;
-1633 
-1634   while (goAgain) {
-1635     goAgain = false;
-1636     
-1637     if (self.index < self.blocks.length) {
-1638       var calledSynchronously = true;
-1639       var completedSynchronously = false;
-1640 
-1641       var onComplete = function () {
-1642         if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {
-1643           completedSynchronously = true;
-1644           return;
-1645         }
-1646 
-1647         self.offset = 0;
-1648         self.index++;
-1649 
-1650         var now = new Date().getTime();
-1651         if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {
-1652           self.env.lastUpdate = now;
-1653           self.env.setTimeout(function() {
-1654             self.next_();
-1655           }, 0);
-1656         } else {
-1657           if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {
-1658             goAgain = true;
-1659           } else {
-1660             self.next_();
-1661           }
-1662         }
-1663       };
-1664       self.blocks[self.index].execute(onComplete);
-1665 
-1666       calledSynchronously = false;
-1667       if (completedSynchronously) {
-1668         onComplete();
-1669       }
-1670       
-1671     } else {
-1672       self.running = false;
-1673       if (self.onComplete) {
-1674         self.onComplete();
-1675       }
-1676     }
-1677   }
-1678 };
-1679 
-1680 jasmine.Queue.prototype.results = function() {
-1681   var results = new jasmine.NestedResults();
-1682   for (var i = 0; i < this.blocks.length; i++) {
-1683     if (this.blocks[i].results) {
-1684       results.addResult(this.blocks[i].results());
-1685     }
-1686   }
-1687   return results;
-1688 };
-1689 
-1690 
-1691 /* JasmineReporters.reporter
-1692  *    Base object that will get called whenever a Spec, Suite, or Runner is done.  It is up to
-1693  *    descendants of this object to do something with the results (see json_reporter.js)
-1694  */
-1695 jasmine.Reporters = {};
-1696 
-1697 jasmine.Reporters.reporter = function(callbacks) {
-1698   var that = {
-1699     callbacks: callbacks || {},
-1700 
-1701     doCallback: function(callback, results) {
-1702       if (callback) {
-1703         callback(results);
-1704       }
-1705     },
-1706 
-1707     reportRunnerResults: function(runner) {
-1708       that.doCallback(that.callbacks.runnerCallback, runner);
-1709     },
-1710     reportSuiteResults:  function(suite) {
-1711       that.doCallback(that.callbacks.suiteCallback, suite);
-1712     },
-1713     reportSpecResults:   function(spec) {
-1714       that.doCallback(that.callbacks.specCallback, spec);
-1715     },
-1716     log: function (str) {
-1717       if (console && console.log) console.log(str);
-1718     }
-1719   };
-1720 
-1721   return that;
-1722 };
-1723 
-1724 /**
-1725  * Runner
-1726  *
-1727  * @constructor
-1728  * @param {jasmine.Env} env
-1729  */
-1730 jasmine.Runner = function(env) {
-1731   var self = this;
-1732   self.env = env;
-1733   self.queue = new jasmine.Queue(env);
-1734   self.before_ = [];
-1735   self.after_ = [];
-1736   self.suites_ = [];
-1737 };
-1738 
-1739 jasmine.Runner.prototype.execute = function() {
-1740   var self = this;
-1741   if (self.env.reporter.reportRunnerStarting) {
-1742     self.env.reporter.reportRunnerStarting(this);
-1743   }
-1744   self.queue.start(function () {
-1745     self.finishCallback();
-1746   });
-1747 };
-1748 
-1749 jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) {
-1750   beforeEachFunction.typeName = 'beforeEach';
-1751   this.before_.push(beforeEachFunction);
-1752 };
-1753 
-1754 jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
-1755   afterEachFunction.typeName = 'afterEach';
-1756   this.after_.push(afterEachFunction);
-1757 };
-1758 
-1759 
-1760 jasmine.Runner.prototype.finishCallback = function() {
-1761   this.env.reporter.reportRunnerResults(this);
-1762 };
-1763 
-1764 jasmine.Runner.prototype.addSuite = function(suite) {
-1765   this.suites_.push(suite);
-1766 };
-1767 
-1768 jasmine.Runner.prototype.add = function(block) {
-1769   if (block instanceof jasmine.Suite) {
-1770     this.addSuite(block);
-1771   }
-1772   this.queue.add(block);
-1773 };
-1774 
-1775 jasmine.Runner.prototype.specs = function () {
-1776   var suites = this.suites();
-1777   var specs = [];
-1778   for (var i = 0; i < suites.length; i++) {
-1779     specs = specs.concat(suites[i].specs());
-1780   }
-1781   return specs;
-1782 };
-1783 
-1784 
-1785 jasmine.Runner.prototype.suites = function() {
-1786   return this.suites_;
-1787 };
-1788 
-1789 jasmine.Runner.prototype.results = function() {
-1790   return this.queue.results();
-1791 };
-1792 /**
-1793  * Internal representation of a Jasmine specification, or test.
-1794  *
-1795  * @constructor
-1796  * @param {jasmine.Env} env
-1797  * @param {jasmine.Suite} suite
-1798  * @param {String} description
-1799  */
-1800 jasmine.Spec = function(env, suite, description) {
-1801   if (!env) {
-1802     throw new Error('jasmine.Env() required');
-1803   }
-1804   ;
-1805   if (!suite) {
-1806     throw new Error('jasmine.Suite() required');
-1807   }
-1808   ;
-1809   var spec = this;
-1810   spec.id = env.nextSpecId ? env.nextSpecId() : null;
-1811   spec.env = env;
-1812   spec.suite = suite;
-1813   spec.description = description;
-1814   spec.queue = new jasmine.Queue(env);
-1815 
-1816   spec.afterCallbacks = [];
-1817   spec.spies_ = [];
-1818 
-1819   spec.results_ = new jasmine.NestedResults();
-1820   spec.results_.description = description;
-1821   spec.matchersClass = null;
-1822 };
-1823 
-1824 jasmine.Spec.prototype.getFullName = function() {
-1825   return this.suite.getFullName() + ' ' + this.description + '.';
-1826 };
-1827 
-1828 
-1829 jasmine.Spec.prototype.results = function() {
-1830   return this.results_;
-1831 };
-1832 
-1833 jasmine.Spec.prototype.log = function(message) {
-1834   return this.results_.log(message);
-1835 };
-1836 
-1837 /** @deprecated */
-1838 jasmine.Spec.prototype.getResults = function() {
-1839   return this.results_;
-1840 };
-1841 
-1842 jasmine.Spec.prototype.runs = function (func) {
-1843   var block = new jasmine.Block(this.env, func, this);
-1844   this.addToQueue(block);
-1845   return this;
-1846 };
-1847 
-1848 jasmine.Spec.prototype.addToQueue = function (block) {
-1849   if (this.queue.isRunning()) {
-1850     this.queue.insertNext(block);
-1851   } else {
-1852     this.queue.add(block);
-1853   }
-1854 };
-1855 
-1856 jasmine.Spec.prototype.addMatcherResult = function(result) {
-1857   this.results_.addResult(result);
-1858 };
-1859 
-1860 jasmine.Spec.prototype.expect = function(actual) {
-1861   return new (this.getMatchersClass_())(this.env, actual, this);
-1862 };
-1863 
-1864 jasmine.Spec.prototype.waits = function(timeout) {
-1865   var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this);
-1866   this.addToQueue(waitsFunc);
-1867   return this;
-1868 };
-1869 
-1870 jasmine.Spec.prototype.waitsFor = function(timeout, latchFunction, timeoutMessage) {
-1871   var waitsForFunc = new jasmine.WaitsForBlock(this.env, timeout, latchFunction, timeoutMessage, this);
-1872   this.addToQueue(waitsForFunc);
-1873   return this;
-1874 };
-1875 
-1876 jasmine.Spec.prototype.fail = function (e) {
-1877   var expectationResult = new jasmine.ExpectationResult({
-1878     passed: false,
-1879     message: e ? jasmine.util.formatException(e) : 'Exception'
-1880   });
-1881   this.results_.addResult(expectationResult);
-1882 };
-1883 
-1884 jasmine.Spec.prototype.getMatchersClass_ = function() {
-1885   return this.matchersClass || jasmine.Matchers;
-1886 };
-1887 
-1888 jasmine.Spec.prototype.addMatchers = function(matchersPrototype) {
-1889   var parent = this.getMatchersClass_();
-1890   var newMatchersClass = function() {
-1891     parent.apply(this, arguments);
-1892   };
-1893   jasmine.util.inherit(newMatchersClass, parent);
-1894   for (var method in matchersPrototype) {
-1895     newMatchersClass.prototype[method] = matchersPrototype[method];
-1896   }
-1897   this.matchersClass = newMatchersClass;
-1898 };
-1899 
-1900 jasmine.Spec.prototype.finishCallback = function() {
-1901   this.env.reporter.reportSpecResults(this);
-1902 };
-1903 
-1904 jasmine.Spec.prototype.finish = function(onComplete) {
-1905   this.removeAllSpies();
-1906   this.finishCallback();
-1907   if (onComplete) {
-1908     onComplete();
-1909   }
-1910 };
-1911 
-1912 jasmine.Spec.prototype.after = function(doAfter, test) {
-1913 
-1914   if (this.queue.isRunning()) {
-1915     this.queue.add(new jasmine.Block(this.env, doAfter, this));
-1916   } else {
-1917     this.afterCallbacks.unshift(doAfter);
-1918   }
-1919 };
-1920 
-1921 jasmine.Spec.prototype.execute = function(onComplete) {
-1922   var spec = this;
-1923   if (!spec.env.specFilter(spec)) {
-1924     spec.results_.skipped = true;
-1925     spec.finish(onComplete);
-1926     return;
-1927   }
-1928   this.env.reporter.log('>> Jasmine Running ' + this.suite.description + ' ' + this.description + '...');
-1929 
-1930   spec.env.currentSpec = spec;
-1931 
-1932   spec.addBeforesAndAftersToQueue();
-1933 
-1934   spec.queue.start(function () {
-1935     spec.finish(onComplete);
-1936   });
-1937 };
-1938 
-1939 jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() {
-1940   var runner = this.env.currentRunner();
-1941   for (var suite = this.suite; suite; suite = suite.parentSuite) {
-1942     for (var i = 0; i < suite.before_.length; i++) {
-1943       this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this));
-1944     }
-1945   }
-1946   for (var i = 0; i < runner.before_.length; i++) {
-1947     this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this));
-1948   }
-1949   for (i = 0; i < this.afterCallbacks.length; i++) {
-1950     this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this));
-1951   }
-1952   for (suite = this.suite; suite; suite = suite.parentSuite) {
-1953     for (var i = 0; i < suite.after_.length; i++) {
-1954       this.queue.add(new jasmine.Block(this.env, suite.after_[i], this));
-1955     }
-1956   }
-1957   for (var i = 0; i < runner.after_.length; i++) {
-1958     this.queue.add(new jasmine.Block(this.env, runner.after_[i], this));
-1959   }
-1960 };
-1961 
-1962 jasmine.Spec.prototype.explodes = function() {
-1963   throw 'explodes function should not have been called';
-1964 };
-1965 
-1966 jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) {
-1967   if (obj == undefined) {
-1968     throw "spyOn could not find an object to spy upon for " + methodName + "()";
-1969   }
-1970 
-1971   if (!ignoreMethodDoesntExist && obj[methodName] === undefined) {
-1972     throw methodName + '() method does not exist';
-1973   }
-1974 
-1975   if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) {
-1976     throw new Error(methodName + ' has already been spied upon');
-1977   }
-1978 
-1979   var spyObj = jasmine.createSpy(methodName);
-1980 
-1981   this.spies_.push(spyObj);
-1982   spyObj.baseObj = obj;
-1983   spyObj.methodName = methodName;
-1984   spyObj.originalValue = obj[methodName];
-1985 
-1986   obj[methodName] = spyObj;
-1987 
-1988   return spyObj;
-1989 };
-1990 
-1991 jasmine.Spec.prototype.removeAllSpies = function() {
-1992   for (var i = 0; i < this.spies_.length; i++) {
-1993     var spy = this.spies_[i];
-1994     spy.baseObj[spy.methodName] = spy.originalValue;
-1995   }
-1996   this.spies_ = [];
-1997 };
-1998 
-1999 /**
-2000  * Internal representation of a Jasmine suite.
-2001  *
-2002  * @constructor
-2003  * @param {jasmine.Env} env
-2004  * @param {String} description
-2005  * @param {Function} specDefinitions
-2006  * @param {jasmine.Suite} parentSuite
-2007  */
-2008 jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
-2009   var self = this;
-2010   self.id = env.nextSuiteId ? env.nextSuiteId() : null;
-2011   self.description = description;
-2012   self.queue = new jasmine.Queue(env);
-2013   self.parentSuite = parentSuite;
-2014   self.env = env;
-2015   self.before_ = [];
-2016   self.after_ = [];
-2017   self.specs_ = [];
-2018 };
-2019 
-2020 jasmine.Suite.prototype.getFullName = function() {
-2021   var fullName = this.description;
-2022   for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
-2023     fullName = parentSuite.description + ' ' + fullName;
-2024   }
-2025   return fullName;
-2026 };
-2027 
-2028 jasmine.Suite.prototype.finish = function(onComplete) {
-2029   this.env.reporter.reportSuiteResults(this);
-2030   this.finished = true;
-2031   if (typeof(onComplete) == 'function') {
-2032     onComplete();
-2033   }
-2034 };
-2035 
-2036 jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
-2037   beforeEachFunction.typeName = 'beforeEach';
-2038   this.before_.push(beforeEachFunction);
-2039 };
-2040 
-2041 jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
-2042   afterEachFunction.typeName = 'afterEach';
-2043   this.after_.push(afterEachFunction);
-2044 };
-2045 
-2046 jasmine.Suite.prototype.results = function() {
-2047   return this.queue.results();
-2048 };
-2049 
-2050 jasmine.Suite.prototype.add = function(block) {
-2051   if (block instanceof jasmine.Suite) {
-2052     this.env.currentRunner().addSuite(block);
-2053   } else {
-2054     this.specs_.push(block);
-2055   }
-2056   this.queue.add(block);
-2057 };
-2058 
-2059 jasmine.Suite.prototype.specs = function() {
-2060   return this.specs_;
-2061 };
-2062 
-2063 jasmine.Suite.prototype.execute = function(onComplete) {
-2064   var self = this;
-2065   this.queue.start(function () {
-2066     self.finish(onComplete);
-2067   });
-2068 };
-2069 jasmine.WaitsBlock = function(env, timeout, spec) {
-2070   this.timeout = timeout;
-2071   jasmine.Block.call(this, env, null, spec);
-2072 };
-2073 
-2074 jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block);
-2075 
-2076 jasmine.WaitsBlock.prototype.execute = function (onComplete) {
-2077   this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...');
-2078   this.env.setTimeout(function () {
-2079     onComplete();
-2080   }, this.timeout);
-2081 };
-2082 jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
-2083   this.timeout = timeout;
-2084   this.latchFunction = latchFunction;
-2085   this.message = message;
-2086   this.totalTimeSpentWaitingForLatch = 0;
-2087   jasmine.Block.call(this, env, null, spec);
-2088 };
-2089 
-2090 jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block);
-2091 
-2092 jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 100;
-2093 
-2094 jasmine.WaitsForBlock.prototype.execute = function (onComplete) {
-2095   var self = this;
-2096   self.env.reporter.log('>> Jasmine waiting for ' + (self.message || 'something to happen'));
-2097   var latchFunctionResult;
-2098   try {
-2099     latchFunctionResult = self.latchFunction.apply(self.spec);
-2100   } catch (e) {
-2101     self.spec.fail(e);
-2102     onComplete();
-2103     return;
-2104   }
-2105 
-2106   if (latchFunctionResult) {
-2107     onComplete();
-2108   } else if (self.totalTimeSpentWaitingForLatch >= self.timeout) {
-2109     var message = 'timed out after ' + self.timeout + ' msec waiting for ' + (self.message || 'something to happen');
-2110     self.spec.fail({
-2111       name: 'timeout',
-2112       message: message
-2113     });
-2114     self.spec._next();
-2115   } else {
-2116     self.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;
-2117     self.env.setTimeout(function () { self.execute(onComplete); }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);
-2118   }
-2119 };
-2120 // Mock setTimeout, clearTimeout
-2121 // Contributed by Pivotal Computer Systems, www.pivotalsf.com
-2122 
-2123 jasmine.FakeTimer = function() {
-2124   this.reset();
-2125 
-2126   var self = this;
-2127   self.setTimeout = function(funcToCall, millis) {
-2128     self.timeoutsMade++;
-2129     self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false);
-2130     return self.timeoutsMade;
-2131   };
-2132 
-2133   self.setInterval = function(funcToCall, millis) {
-2134     self.timeoutsMade++;
-2135     self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true);
-2136     return self.timeoutsMade;
-2137   };
-2138 
-2139   self.clearTimeout = function(timeoutKey) {
-2140     self.scheduledFunctions[timeoutKey] = undefined;
-2141   };
-2142 
-2143   self.clearInterval = function(timeoutKey) {
-2144     self.scheduledFunctions[timeoutKey] = undefined;
-2145   };
-2146 
-2147 };
-2148 
-2149 jasmine.FakeTimer.prototype.reset = function() {
-2150   this.timeoutsMade = 0;
-2151   this.scheduledFunctions = {};
-2152   this.nowMillis = 0;
-2153 };
-2154 
-2155 jasmine.FakeTimer.prototype.tick = function(millis) {
-2156   var oldMillis = this.nowMillis;
-2157   var newMillis = oldMillis + millis;
-2158   this.runFunctionsWithinRange(oldMillis, newMillis);
-2159   this.nowMillis = newMillis;
-2160 };
-2161 
-2162 jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
-2163   var scheduledFunc;
-2164   var funcsToRun = [];
-2165   for (var timeoutKey in this.scheduledFunctions) {
-2166     scheduledFunc = this.scheduledFunctions[timeoutKey];
-2167     if (scheduledFunc != undefined &&
-2168         scheduledFunc.runAtMillis >= oldMillis &&
-2169         scheduledFunc.runAtMillis <= nowMillis) {
-2170       funcsToRun.push(scheduledFunc);
-2171       this.scheduledFunctions[timeoutKey] = undefined;
-2172     }
-2173   }
-2174 
-2175   if (funcsToRun.length > 0) {
-2176     funcsToRun.sort(function(a, b) {
-2177       return a.runAtMillis - b.runAtMillis;
-2178     });
-2179     for (var i = 0; i < funcsToRun.length; ++i) {
-2180       try {
-2181         var funcToRun = funcsToRun[i];
-2182         this.nowMillis = funcToRun.runAtMillis;
-2183         funcToRun.funcToCall();
-2184         if (funcToRun.recurring) {
-2185           this.scheduleFunction(funcToRun.timeoutKey,
-2186             funcToRun.funcToCall,
-2187             funcToRun.millis,
-2188             true);
-2189         }
-2190       } catch(e) {
-2191       }
-2192     }
-2193     this.runFunctionsWithinRange(oldMillis, nowMillis);
-2194   }
-2195 };
-2196 
-2197 jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) {
-2198   this.scheduledFunctions[timeoutKey] = {
-2199     runAtMillis: this.nowMillis + millis,
-2200     funcToCall: funcToCall,
-2201     recurring: recurring,
-2202     timeoutKey: timeoutKey,
-2203     millis: millis
-2204   };
-2205 };
-2206 
-2207 
-2208 jasmine.Clock = {
-2209   defaultFakeTimer: new jasmine.FakeTimer(),
-2210 
-2211   reset: function() {
-2212     jasmine.Clock.assertInstalled();
-2213     jasmine.Clock.defaultFakeTimer.reset();
-2214   },
-2215 
-2216   tick: function(millis) {
-2217     jasmine.Clock.assertInstalled();
-2218     jasmine.Clock.defaultFakeTimer.tick(millis);
-2219   },
-2220 
-2221   runFunctionsWithinRange: function(oldMillis, nowMillis) {
-2222     jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis);
-2223   },
-2224 
-2225   scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) {
-2226     jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring);
-2227   },
-2228 
-2229   useMock: function() {
-2230     var spec = jasmine.getEnv().currentSpec;
-2231     spec.after(jasmine.Clock.uninstallMock);
-2232 
-2233     jasmine.Clock.installMock();
-2234   },
-2235 
-2236   installMock: function() {
-2237     jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer;
-2238   },
-2239 
-2240   uninstallMock: function() {
-2241     jasmine.Clock.assertInstalled();
-2242     jasmine.Clock.installed = jasmine.Clock.real;
-2243   },
-2244 
-2245   real: {
-2246     setTimeout: window.setTimeout,
-2247     clearTimeout: window.clearTimeout,
-2248     setInterval: window.setInterval,
-2249     clearInterval: window.clearInterval
-2250   },
-2251 
-2252   assertInstalled: function() {
-2253     if (jasmine.Clock.installed != jasmine.Clock.defaultFakeTimer) {
-2254       throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()");
-2255     }
-2256   },
-2257 
-2258   installed: null
-2259 };
-2260 jasmine.Clock.installed = jasmine.Clock.real;
-2261 
-2262 //else for IE support
-2263 window.setTimeout = function(funcToCall, millis) {
-2264   if (jasmine.Clock.installed.setTimeout.apply) {
-2265     return jasmine.Clock.installed.setTimeout.apply(this, arguments);
-2266   } else {
-2267     return jasmine.Clock.installed.setTimeout(funcToCall, millis);
-2268   }
-2269 };
-2270 
-2271 window.setInterval = function(funcToCall, millis) {
-2272   if (jasmine.Clock.installed.setInterval.apply) {
-2273     return jasmine.Clock.installed.setInterval.apply(this, arguments);
-2274   } else {
-2275     return jasmine.Clock.installed.setInterval(funcToCall, millis);
-2276   }
-2277 };
-2278 
-2279 window.clearTimeout = function(timeoutKey) {
-2280   if (jasmine.Clock.installed.clearTimeout.apply) {
-2281     return jasmine.Clock.installed.clearTimeout.apply(this, arguments);
-2282   } else {
-2283     return jasmine.Clock.installed.clearTimeout(timeoutKey);
-2284   }
-2285 };
-2286 
-2287 window.clearInterval = function(timeoutKey) {
-2288   if (jasmine.Clock.installed.clearTimeout.apply) {
-2289     return jasmine.Clock.installed.clearInterval.apply(this, arguments);
-2290   } else {
-2291   return jasmine.Clock.installed.clearInterval(timeoutKey);
-2292   }
-2293 };
-2294 
-2295 
\ No newline at end of file diff --git a/doc/symbols/src/lib_jasmine-0.9.0.js.html b/doc/symbols/src/lib_jasmine-0.9.0.js.html deleted file mode 100644 index 32323ad..0000000 --- a/doc/symbols/src/lib_jasmine-0.9.0.js.html +++ /dev/null @@ -1,2212 +0,0 @@ -
  1 /**
-  2  * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
-  3  *
-  4  * @namespace
-  5  */
-  6 var jasmine = {};
-  7 
-  8 /**
-  9  * @private
- 10  */
- 11 jasmine.unimplementedMethod_ = function() {
- 12   throw new Error("unimplemented method");
- 13 };
- 14 
- 15 /**
- 16  * Large or small values here may result in slow test running & "Too much recursion" errors
- 17  *
- 18  */
- 19 jasmine.UPDATE_INTERVAL = 250;
- 20 
- 21 /**
- 22  * Allows for bound functions to be comapred.  Internal use only.
- 23  *
- 24  * @ignore
- 25  * @private
- 26  * @param base {Object} bound 'this' for the function
- 27  * @param name {Function} function to find
- 28  */
- 29 jasmine.bindOriginal_ = function(base, name) {
- 30   var original = base[name];
- 31   return function() {
- 32     if (original.apply) {
- 33       return original.apply(base, arguments);
- 34     } else {
- 35       //IE support
- 36       if (base == window) {
- 37         return window[name].apply(window, arguments);
- 38       }
- 39     }
- 40   };
- 41 };
- 42 
- 43 jasmine.setTimeout = jasmine.bindOriginal_(window, 'setTimeout');
- 44 jasmine.clearTimeout = jasmine.bindOriginal_(window, 'clearTimeout');
- 45 jasmine.setInterval = jasmine.bindOriginal_(window, 'setInterval');
- 46 jasmine.clearInterval = jasmine.bindOriginal_(window, 'clearInterval');
- 47 
- 48 jasmine.MessageResult = function(text) {
- 49   this.type = 'MessageResult';
- 50   this.text = text;
- 51   this.trace = new Error(); // todo: test better
- 52 };
- 53 
- 54 jasmine.ExpectationResult = function(passed, message, details) {
- 55   this.type = 'ExpectationResult';
- 56   this.passed_ = passed;
- 57   this.message = message;
- 58   this.details = details;
- 59   this.trace = new Error(message); // todo: test better
- 60 };
- 61 
- 62 jasmine.ExpectationResult.prototype.passed = function () {
- 63   return this.passed_;
- 64 };
- 65 
- 66 /**
- 67  * Getter for the Jasmine environment. Ensures one gets created
- 68  */
- 69 jasmine.getEnv = function() {
- 70   return jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env();
- 71 };
- 72 
- 73 /**
- 74  * @ignore
- 75  * @private
- 76  * @param value
- 77  * @returns {Boolean}
- 78  */
- 79 jasmine.isArray_ = function(value) {
- 80   return value &&
- 81          typeof value === 'object' &&
- 82          typeof value.length === 'number' &&
- 83          typeof value.splice === 'function' &&
- 84          !(value.propertyIsEnumerable('length'));
- 85 };
- 86 
- 87 /**
- 88  * Pretty printer for expecations.  Takes any object and turns it into a human-readable string.
- 89  *
- 90  * @param value {Object} an object to be outputted
- 91  * @returns {String}
- 92  */
- 93 jasmine.pp = function(value) {
- 94   var stringPrettyPrinter = new jasmine.StringPrettyPrinter();
- 95   stringPrettyPrinter.format(value);
- 96   return stringPrettyPrinter.string;
- 97 };
- 98 
- 99 /**
-100  * Returns true if the object is a DOM Node.
-101  *
-102  * @param {Object} obj object to check
-103  * @returns {Boolean}
-104  */
-105 jasmine.isDomNode = function(obj) {
-106   return obj['nodeType'] > 0;
-107 };
-108 
-109 /**
-110  * Returns a matchable 'generic' object of the class type.  For use in expecations of type when values don't matter.
-111  *
-112  * @example
-113  * // don't care about which function is passed in, as long as it's a function
-114  * expect(mySpy).wasCalledWith(jasmine.any(Function));
-115  *
-116  * @param {Class} clazz
-117  * @returns matchable object of the type clazz
-118  */
-119 jasmine.any = function(clazz) {
-120   return new jasmine.Matchers.Any(clazz);
-121 };
-122 
-123 /**
-124  * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
-125  *
-126  * Spies should be created in test setup, before expectations.  They can then be checked, using the standard Jasmine
-127  * expectation syntax. Spies can be checked if they were called or not and what the calling params were.
-128  *
-129  * A Spy has the following mehtod: wasCalled, callCount, mostRecentCall, and argsForCall (see docs)
-130  * Spies are torn down at the end of every spec.
-131  *
-132  * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
-133  *
-134  * @example
-135  * // a stub
-136  * var myStub = jasmine.createSpy('myStub');  // can be used anywhere
-137  *
-138  * // spy example
-139  * var foo = {
-140  *   not: function(bool) { return !bool; }
-141  * }
-142  *
-143  * // actual foo.not will not be called, execution stops
-144  * spyOn(foo, 'not');
-145 
-146  // foo.not spied upon, execution will continue to implementation
-147  * spyOn(foo, 'not').andCallThrough();
-148  *
-149  * // fake example
-150  * var foo = {
-151  *   not: function(bool) { return !bool; }
-152  * }
-153  *
-154  * // foo.not(val) will return val
-155  * spyOn(foo, 'not').andCallFake(function(value) {return value;});
-156  *
-157  * // mock example
-158  * foo.not(7 == 7);
-159  * expect(foo.not).wasCalled();
-160  * expect(foo.not).wasCalledWith(true);
-161  *
-162  * @constructor
-163  * @see spyOn, jasmine.createSpy, jasmine.createSpyObj
-164  * @param {String} name
-165  */
-166 jasmine.Spy = function(name) {
-167   /**
-168    * The name of the spy, if provided.
-169    */
-170   this.identity = name || 'unknown';
-171   /**
-172    *  Is this Object a spy?
-173    */
-174   this.isSpy = true;
-175   /**
-176    * The acutal function this spy stubs.
-177    */
-178   this.plan = function() {
-179   };
-180   /**
-181    * Tracking of the most recent call to the spy.
-182    * @example
-183    * var mySpy = jasmine.createSpy('foo');
-184    * mySpy(1, 2);
-185    * mySpy.mostRecentCall.args = [1, 2];
-186    */
-187   this.mostRecentCall = {};
-188 
-189   /**
-190    * Holds arguments for each call to the spy, indexed by call count
-191    * @example
-192    * var mySpy = jasmine.createSpy('foo');
-193    * mySpy(1, 2);
-194    * mySpy(7, 8);
-195    * mySpy.mostRecentCall.args = [7, 8];
-196    * mySpy.argsForCall[0] = [1, 2];
-197    * mySpy.argsForCall[1] = [7, 8];
-198    */
-199   this.argsForCall = [];
-200   this.calls = [];
-201 };
-202 
-203 /**
-204  * Tells a spy to call through to the actual implemenatation.
-205  *
-206  * @example
-207  * var foo = {
-208  *   bar: function() { // do some stuff }
-209  * }
-210  *
-211  * // defining a spy on an existing property: foo.bar
-212  * spyOn(foo, 'bar').andCallThrough();
-213  */
-214 jasmine.Spy.prototype.andCallThrough = function() {
-215   this.plan = this.originalValue;
-216   return this;
-217 };
-218 
-219 /**
-220  * For setting the return value of a spy.
-221  *
-222  * @example
-223  * // defining a spy from scratch: foo() returns 'baz'
-224  * var foo = jasmine.createSpy('spy on foo').andReturn('baz');
-225  *
-226  * // defining a spy on an existing property: foo.bar() returns 'baz'
-227  * spyOn(foo, 'bar').andReturn('baz');
-228  *
-229  * @param {Object} value
-230  */
-231 jasmine.Spy.prototype.andReturn = function(value) {
-232   this.plan = function() {
-233     return value;
-234   };
-235   return this;
-236 };
-237 
-238 /**
-239  * For throwing an exception when a spy is called.
-240  *
-241  * @example
-242  * // defining a spy from scratch: foo() throws an exception w/ message 'ouch'
-243  * var foo = jasmine.createSpy('spy on foo').andThrow('baz');
-244  *
-245  * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
-246  * spyOn(foo, 'bar').andThrow('baz');
-247  *
-248  * @param {String} exceptionMsg
-249  */
-250 jasmine.Spy.prototype.andThrow = function(exceptionMsg) {
-251   this.plan = function() {
-252     throw exceptionMsg;
-253   };
-254   return this;
-255 };
-256 
-257 /**
-258  * Calls an alternate implementation when a spy is called.
-259  *
-260  * @example
-261  * var baz = function() {
-262  *   // do some stuff, return something
-263  * }
-264  * // defining a spy from scratch: foo() calls the function baz
-265  * var foo = jasmine.createSpy('spy on foo').andCall(baz);
-266  *
-267  * // defining a spy on an existing property: foo.bar() calls an anonymnous function
-268  * spyOn(foo, 'bar').andCall(function() { return 'baz';} );
-269  *
-270  * @param {Function} fakeFunc
-271  */
-272 jasmine.Spy.prototype.andCallFake = function(fakeFunc) {
-273   this.plan = fakeFunc;
-274   return this;
-275 };
-276 
-277 /**
-278  * Resets all of a spy's the tracking variables so that it can be used again.
-279  *
-280  * @example
-281  * spyOn(foo, 'bar');
-282  *
-283  * foo.bar();
-284  *
-285  * expect(foo.bar.callCount).toEqual(1);
-286  *
-287  * foo.bar.reset();
-288  *
-289  * expect(foo.bar.callCount).toEqual(0);
-290  */
-291 jasmine.Spy.prototype.reset = function() {
-292   this.wasCalled = false;
-293   this.callCount = 0;
-294   this.argsForCall = [];
-295   this.calls = [];
-296   this.mostRecentCall = {};
-297 };
-298 
-299 jasmine.createSpy = function(name) {
-300 
-301   var spyObj = function() {
-302     spyObj.wasCalled = true;
-303     spyObj.callCount++;
-304     var args = jasmine.util.argsToArray(arguments);
-305     spyObj.mostRecentCall.object = this;
-306     spyObj.mostRecentCall.args = args;
-307     spyObj.argsForCall.push(args);
-308     spyObj.calls.push({object: this, args: args});
-309     return spyObj.plan.apply(this, arguments);
-310   };
-311 
-312   var spy = new jasmine.Spy(name);
-313 
-314   for (var prop in spy) {
-315     spyObj[prop] = spy[prop];
-316   }
-317 
-318   spyObj.reset();
-319 
-320   return spyObj;
-321 };
-322 
-323 /**
-324  * Creates a more complicated spy: an Object that has every property a function that is a spy.  Used for stubbing something
-325  * large in one call.
-326  *
-327  * @param {String} baseName name of spy class
-328  * @param {Array} methodNames array of names of methods to make spies
-329  */
-330 jasmine.createSpyObj = function(baseName, methodNames) {
-331   var obj = {};
-332   for (var i = 0; i < methodNames.length; i++) {
-333     obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]);
-334   }
-335   return obj;
-336 };
-337 
-338 jasmine.log = function(message) {
-339   jasmine.getEnv().currentSpec.log(message);
-340 };
-341 
-342 /**
-343  * Function that installs a spy on an existing object's method name.  Used within a Spec to create a spy.
-344  *
-345  * @example
-346  * // spy example
-347  * var foo = {
-348  *   not: function(bool) { return !bool; }
-349  * }
-350  * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
-351  *
-352  * @see jasmine.createSpy
-353  * @param obj
-354  * @param methodName
-355  * @returns a Jasmine spy that can be chained with all spy methods
-356  */
-357 var spyOn = function(obj, methodName) {
-358   return jasmine.getEnv().currentSpec.spyOn(obj, methodName);
-359 };
-360 
-361 /**
-362  * Creates a Jasmine spec that will be added to the current suite.
-363  *
-364  * // TODO: pending tests
-365  *
-366  * @example
-367  * it('should be true', function() {
-368  *   expect(true).toEqual(true);
-369  * });
-370  *
-371  * @param {String} desc description of this specification
-372  * @param {Function} func defines the preconditions and expectations of the spec
-373  */
-374 var it = function(desc, func) {
-375   return jasmine.getEnv().it(desc, func);
-376 };
-377 
-378 /**
-379  * Creates a <em>disabled</em> Jasmine spec.
-380  *
-381  * A convenience method that allows existing specs to be disabled temporarily during development.
-382  *
-383  * @param {String} desc description of this specification
-384  * @param {Function} func defines the preconditions and expectations of the spec
-385  */
-386 var xit = function(desc, func) {
-387   return jasmine.getEnv().xit(desc, func);
-388 };
-389 
-390 /**
-391  * Starts a chain for a Jasmine expectation.
-392  *
-393  * It is passed an Object that is the actual value and should chain to one of the many
-394  * jasmine.Matchers functions.
-395  *
-396  * @param {Object} actual Actual value to test against and expected value
-397  */
-398 var expect = function(actual) {
-399   return jasmine.getEnv().currentSpec.expect(actual);
-400 };
-401 
-402 /**
-403  * Defines part of a jasmine spec.  Used in cominbination with waits or waitsFor in asynchrnous specs.
-404  *
-405  * @param {Function} func Function that defines part of a jasmine spec.
-406  */
-407 var runs = function(func) {
-408   jasmine.getEnv().currentSpec.runs(func);
-409 };
-410 
-411 /**
-412  * Waits for a timeout before moving to the next runs()-defined block.
-413  * @param {Number} timeout
-414  */
-415 var waits = function(timeout) {
-416   jasmine.getEnv().currentSpec.waits(timeout);
-417 };
-418 
-419 /**
-420  * Waits for the latchFunction to return true before proceeding to the next runs()-defined block.
-421  *
-422  * @param {Number} timeout
-423  * @param {Function} latchFunction
-424  * @param {String} message
-425  */
-426 var waitsFor = function(timeout, latchFunction, message) {
-427   jasmine.getEnv().currentSpec.waitsFor(timeout, latchFunction, message);
-428 };
-429 
-430 /**
-431  * A function that is called before each spec in a suite.
-432  *
-433  * Used for spec setup, including validating assumptions.
-434  *
-435  * @param {Function} beforeEachFunction
-436  */
-437 var beforeEach = function(beforeEachFunction) {
-438   jasmine.getEnv().beforeEach(beforeEachFunction);
-439 };
-440 
-441 /**
-442  * A function that is called after each spec in a suite.
-443  *
-444  * Used for restoring any state that is hijacked during spec execution.
-445  *
-446  * @param {Function} afterEachFunction
-447  */
-448 var afterEach = function(afterEachFunction) {
-449   jasmine.getEnv().afterEach(afterEachFunction);
-450 };
-451 
-452 /**
-453  * Defines a suite of specifications.
-454  *
-455  * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
-456  * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
-457  * of setup in some tests.
-458  *
-459  * @example
-460  * // TODO: a simple suite
-461  *
-462  * // TODO: a simple suite with a nested describe block
-463  *
-464  * @param {String} description A string, usually the class under test.
-465  * @param {Function} specDefinitions function that defines several specs.
-466  */
-467 var describe = function(description, specDefinitions) {
-468   return jasmine.getEnv().describe(description, specDefinitions);
-469 };
-470 
-471 /**
-472  * Disables a suite of specifications.  Used to disable some suites in a file, or files, temporarily during development.
-473  *
-474  * @param {String} description A string, usually the class under test.
-475  * @param {Function} specDefinitions function that defines several specs.
-476  */
-477 var xdescribe = function(description, specDefinitions) {
-478   return jasmine.getEnv().xdescribe(description, specDefinitions);
-479 };
-480 
-481 
-482 jasmine.XmlHttpRequest = XMLHttpRequest;
-483 
-484 // Provide the XMLHttpRequest class for IE 5.x-6.x:
-485 if (typeof XMLHttpRequest == "undefined") jasmine.XmlHttpRequest = function() {
-486   try {
-487     return new ActiveXObject("Msxml2.XMLHTTP.6.0");
-488   } catch(e) {
-489   }
-490   try {
-491     return new ActiveXObject("Msxml2.XMLHTTP.3.0");
-492   } catch(e) {
-493   }
-494   try {
-495     return new ActiveXObject("Msxml2.XMLHTTP");
-496   } catch(e) {
-497   }
-498   try {
-499     return new ActiveXObject("Microsoft.XMLHTTP");
-500   } catch(e) {
-501   }
-502   throw new Error("This browser does not support XMLHttpRequest.");
-503 };
-504 
-505 /**
-506  * Adds suite files to an HTML document so that they are executed, thus adding them to the current
-507  * Jasmine environment.
-508  *
-509  * @param {String} url path to the file to include
-510  * @param {Boolean} opt_global
-511  */
-512 jasmine.include = function(url, opt_global) {
-513   if (opt_global) {
-514     document.write('<script type="text/javascript" src="' + url + '"></' + 'script>');
-515   } else {
-516     var xhr;
-517     try {
-518       xhr = new jasmine.XmlHttpRequest();
-519       xhr.open("GET", url, false);
-520       xhr.send(null);
-521     } catch(e) {
-522       throw new Error("couldn't fetch " + url + ": " + e);
-523     }
-524 
-525     return eval(xhr.responseText);
-526   }
-527 };
-528 
-529 jasmine.version_= {
-530   "major": 0,
-531   "minor": 9,
-532   "build": 0,
-533   "revision": 1255662021
-534   };
-535 /**
-536  * @namespace
-537  */
-538 jasmine.util = {};
-539 
-540 /**
-541  * Declare that a child class inherite it's prototype from the parent class.
-542  *
-543  * @private
-544  * @param {Function} childClass
-545  * @param {Function} parentClass
-546  */
-547 jasmine.util.inherit = function(childClass, parentClass) {
-548   var subclass = function() {
-549   };
-550   subclass.prototype = parentClass.prototype;
-551   childClass.prototype = new subclass;
-552 };
-553 
-554 jasmine.util.formatException = function(e) {
-555   var lineNumber;
-556   if (e.line) {
-557     lineNumber = e.line;
-558   }
-559   else if (e.lineNumber) {
-560     lineNumber = e.lineNumber;
-561   }
-562 
-563   var file;
-564 
-565   if (e.sourceURL) {
-566     file = e.sourceURL;
-567   }
-568   else if (e.fileName) {
-569     file = e.fileName;
-570   }
-571 
-572   var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();
-573 
-574   if (file && lineNumber) {
-575     message += ' in ' + file + ' (line ' + lineNumber + ')';
-576   }
-577 
-578   return message;
-579 };
-580 
-581 jasmine.util.htmlEscape = function(str) {
-582   if (!str) return str;
-583   return str.replace(/&/g, '&')
-584     .replace(/</g, '<')
-585     .replace(/>/g, '>');
-586 };
-587 
-588 jasmine.util.argsToArray = function(args) {
-589   var arrayOfArgs = [];
-590   for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);
-591   return arrayOfArgs;
-592 };
-593 
-594 /**
-595  * Environment for Jasmine
-596  *
-597  * @constructor
-598  */
-599 jasmine.Env = function() {
-600   this.currentSpec = null;
-601   this.currentSuite = null;
-602   this.currentRunner_ = new jasmine.Runner(this);
-603   this.currentlyRunningTests = false;
-604 
-605   this.reporter = new jasmine.MultiReporter();
-606 
-607   this.updateInterval = jasmine.UPDATE_INTERVAL
-608   this.lastUpdate = 0;
-609   this.specFilter = function() {
-610     return true;
-611   };
-612 
-613   this.nextSpecId_ = 0;
-614   this.nextSuiteId_ = 0;
-615   this.equalityTesters_ = [];
-616 };
-617 
-618 
-619 jasmine.Env.prototype.setTimeout = jasmine.setTimeout;
-620 jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout;
-621 jasmine.Env.prototype.setInterval = jasmine.setInterval;
-622 jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
-623 
-624 /**
-625  * @returns an object containing jasmine version build info, if set.
-626  */
-627 jasmine.Env.prototype.version = function () {
-628   if (jasmine.version_) {
-629     return jasmine.version_;
-630   } else {
-631     throw new Error('Version not set');
-632   }
-633 };
-634 
-635 /**
-636  * @returns a sequential integer starting at 0
-637  */
-638 jasmine.Env.prototype.nextSpecId = function () {
-639   return this.nextSpecId_++;
-640 };
-641 
-642 /**
-643  * @returns a sequential integer starting at 0
-644  */
-645 jasmine.Env.prototype.nextSuiteId = function () {
-646   return this.nextSuiteId_++;
-647 };
-648 
-649 /**
-650  * Register a reporter to receive status updates from Jasmine.
-651  * @param {jasmine.Reporter} reporter An object which will receive status updates.
-652  */
-653 jasmine.Env.prototype.addReporter = function(reporter) {
-654   this.reporter.addReporter(reporter);
-655 };
-656 
-657 jasmine.Env.prototype.execute = function() {
-658   this.currentRunner_.execute();
-659 };
-660 
-661 jasmine.Env.prototype.describe = function(description, specDefinitions) {
-662   var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite);
-663 
-664   var parentSuite = this.currentSuite;
-665   if (parentSuite) {
-666     parentSuite.add(suite);
-667   } else {
-668     this.currentRunner_.add(suite);
-669   }
-670 
-671   this.currentSuite = suite;
-672 
-673   specDefinitions.call(suite);
-674 
-675   this.currentSuite = parentSuite;
-676 
-677   return suite;
-678 };
-679 
-680 jasmine.Env.prototype.beforeEach = function(beforeEachFunction) {
-681   if (this.currentSuite) {
-682     this.currentSuite.beforeEach(beforeEachFunction);
-683   } else {
-684     this.currentRunner_.beforeEach(beforeEachFunction);
-685   }
-686 };
-687 
-688 jasmine.Env.prototype.currentRunner = function () {
-689   return this.currentRunner_;
-690 };
-691 
-692 jasmine.Env.prototype.afterEach = function(afterEachFunction) {
-693   if (this.currentSuite) {
-694     this.currentSuite.afterEach(afterEachFunction);
-695   } else {
-696     this.currentRunner_.afterEach(afterEachFunction);
-697   }
-698 
-699 };
-700 
-701 jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) {
-702   return {
-703     execute: function() {
-704     }
-705   };
-706 };
-707 
-708 jasmine.Env.prototype.it = function(description, func) {
-709   var spec = new jasmine.Spec(this, this.currentSuite, description);
-710   this.currentSuite.add(spec);
-711   this.currentSpec = spec;
-712 
-713   if (func) {
-714     spec.runs(func);
-715   }
-716 
-717   return spec;
-718 };
-719 
-720 jasmine.Env.prototype.xit = function(desc, func) {
-721   return {
-722     id: this.nextSpecId(),
-723     runs: function() {
-724     }
-725   };
-726 };
-727 
-728 jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
-729   if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
-730     return true;
-731   }
-732 
-733   a.__Jasmine_been_here_before__ = b;
-734   b.__Jasmine_been_here_before__ = a;
-735 
-736   var hasKey = function(obj, keyName) {
-737     return obj != null && obj[keyName] !== undefined;
-738   };
-739 
-740   for (var property in b) {
-741     if (!hasKey(a, property) && hasKey(b, property)) {
-742       mismatchKeys.push("expected has key '" + property + "', but missing from <b>actual</b>.");
-743     }
-744   }
-745   for (property in a) {
-746     if (!hasKey(b, property) && hasKey(a, property)) {
-747       mismatchKeys.push("<b>expected</b> missing key '" + property + "', but present in actual.");
-748     }
-749   }
-750   for (property in b) {
-751     if (property == '__Jasmine_been_here_before__') continue;
-752     if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) {
-753       mismatchValues.push("'" + property + "' was<br /><br />'" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "'<br /><br />in expected, but was<br /><br />'" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "'<br /><br />in actual.<br />");
-754     }
-755   }
-756 
-757   if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) {
-758     mismatchValues.push("arrays were not the same length");
-759   }
-760 
-761   delete a.__Jasmine_been_here_before__;
-762   delete b.__Jasmine_been_here_before__;
-763   return (mismatchKeys.length == 0 && mismatchValues.length == 0);
-764 };
-765 
-766 jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
-767   mismatchKeys = mismatchKeys || [];
-768   mismatchValues = mismatchValues || [];
-769 
-770   if (a === b) return true;
-771 
-772   if (a === undefined || a === null || b === undefined || b === null) {
-773     return (a == undefined && b == undefined);
-774   }
-775 
-776   if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) {
-777     return a === b;
-778   }
-779 
-780   if (a instanceof Date && b instanceof Date) {
-781     return a.getTime() == b.getTime();
-782   }
-783 
-784   if (a instanceof jasmine.Matchers.Any) {
-785     return a.matches(b);
-786   }
-787 
-788   if (b instanceof jasmine.Matchers.Any) {
-789     return b.matches(a);
-790   }
-791 
-792   if (typeof a === "object" && typeof b === "object") {
-793     return this.compareObjects_(a, b, mismatchKeys, mismatchValues);
-794   }
-795 
-796   for (var i = 0; i < this.equalityTesters_.length; i++) {
-797     var equalityTester = this.equalityTesters_[i];
-798     var result = equalityTester(a, b, this, mismatchKeys, mismatchValues);
-799     if (result !== undefined) return result;
-800   }
-801 
-802   //Straight check
-803   return (a === b);
-804 };
-805 
-806 jasmine.Env.prototype.contains_ = function(haystack, needle) {
-807   if (jasmine.isArray_(haystack)) {
-808     for (var i = 0; i < haystack.length; i++) {
-809       if (this.equals_(haystack[i], needle)) return true;
-810     }
-811     return false;
-812   }
-813   return haystack.indexOf(needle) >= 0;
-814 };
-815 
-816 jasmine.Env.prototype.addEqualityTester = function(equalityTester) {
-817   this.equalityTesters_.push(equalityTester);
-818 };
-819 /** No-op base class for Jasmine reporters.
-820  *
-821  * @constructor
-822  */
-823 jasmine.Reporter = function() {
-824 };
-825 
-826 //noinspection JSUnusedLocalSymbols
-827 jasmine.Reporter.prototype.reportRunnerStarting = function(runner) {
-828 };
-829 
-830 //noinspection JSUnusedLocalSymbols
-831 jasmine.Reporter.prototype.reportRunnerResults = function(runner) {
-832 };
-833 
-834 //noinspection JSUnusedLocalSymbols
-835 jasmine.Reporter.prototype.reportSuiteResults = function(suite) {
-836 };
-837 
-838 //noinspection JSUnusedLocalSymbols
-839 jasmine.Reporter.prototype.reportSpecResults = function(spec) {
-840 };
-841 
-842 //noinspection JSUnusedLocalSymbols
-843 jasmine.Reporter.prototype.log = function(str) {
-844 };
-845 
-846 /**
-847  * Blocks are functions with executable code that make up a spec.
-848  *
-849  * @constructor
-850  * @param {jasmine.Env} env
-851  * @param {Function} func
-852  * @param {jasmine.Spec} spec
-853  */
-854 jasmine.Block = function(env, func, spec) {
-855   this.env = env;
-856   this.func = func;
-857   this.spec = spec;
-858 };
-859 
-860 jasmine.Block.prototype.execute = function(onComplete) {  
-861   try {
-862     this.func.apply(this.spec);
-863   } catch (e) {
-864     this.spec.fail(e);
-865   }
-866   onComplete();
-867 };
-868 /** JavaScript API reporter.
-869  *
-870  * @constructor
-871  */
-872 jasmine.JsApiReporter = function() {
-873   this.started = false;
-874   this.finished = false;
-875   this.suites_ = [];
-876   this.results_ = {};
-877 };
-878 
-879 jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) {
-880   this.started = true;
-881   var suites = runner.suites();
-882   for (var i = 0; i < suites.length; i++) {
-883     var suite = suites[i];
-884     this.suites_.push(this.summarize_(suite));
-885   }
-886 };
-887 
-888 jasmine.JsApiReporter.prototype.suites = function() {
-889   return this.suites_;
-890 };
-891 
-892 jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) {
-893   var isSuite = suiteOrSpec instanceof jasmine.Suite
-894   var summary = {
-895     id: suiteOrSpec.id,
-896     name: suiteOrSpec.description,
-897     type: isSuite ? 'suite' : 'spec',
-898     children: []
-899   };
-900   if (isSuite) {
-901     var specs = suiteOrSpec.specs();
-902     for (var i = 0; i < specs.length; i++) {
-903       summary.children.push(this.summarize_(specs[i]));
-904     }
-905   }
-906   return summary;
-907 };
-908 
-909 jasmine.JsApiReporter.prototype.results = function() {
-910   return this.results_;
-911 };
-912 
-913 jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) {
-914   return this.results_[specId];
-915 };
-916 
-917 //noinspection JSUnusedLocalSymbols
-918 jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) {
-919   this.finished = true;
-920 };
-921 
-922 //noinspection JSUnusedLocalSymbols
-923 jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) {
-924 };
-925 
-926 //noinspection JSUnusedLocalSymbols
-927 jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) {
-928   this.results_[spec.id] = {
-929     messages: spec.results().getItems(),
-930     result: spec.results().failedCount > 0 ? "failed" : "passed"
-931   };
-932 };
-933 
-934 //noinspection JSUnusedLocalSymbols
-935 jasmine.JsApiReporter.prototype.log = function(str) {
-936 };
-937 
-938 jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){
-939   var results = {};
-940   for (var i = 0; i < specIds.length; i++) {
-941     var specId = specIds[i];
-942     results[specId] = this.summarizeResult_(this.results_[specId]);
-943   }
-944   return results;
-945 };
-946 
-947 jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
-948   var summaryMessages = [];
-949   for (var messageIndex in result.messages) {
-950     var resultMessage = result.messages[messageIndex];
-951     summaryMessages.push({
-952       text: resultMessage.text,
-953       passed: resultMessage.passed ? resultMessage.passed() : true,
-954       type: resultMessage.type,
-955       message: resultMessage.message,
-956       trace: {
-957         stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : undefined
-958       }
-959     });
-960   };
-961 
-962   var summaryResult = {
-963     result : result.result,
-964     messages : summaryMessages
-965   };
-966 
-967   return summaryResult;
-968 };
-969 
-970 jasmine.Matchers = function(env, actual, results) {
-971   this.env = env;
-972   this.actual = actual;
-973   this.passing_message = 'Passed.';
-974   this.results_ = results || new jasmine.NestedResults();
-975 };
-976 
-977 jasmine.Matchers.pp = function(str) {
-978   return jasmine.util.htmlEscape(jasmine.pp(str));
-979 };
-980 
-981 /** @deprecated */
-982 jasmine.Matchers.prototype.getResults = function() {
-983   return this.results_;
-984 };
-985 
-986 jasmine.Matchers.prototype.results = function() {
-987   return this.results_;
-988 };
-989 
-990 jasmine.Matchers.prototype.report = function(result, failing_message, details) {
-991   this.results_.addResult(new jasmine.ExpectationResult(result, result ? this.passing_message : failing_message, details));
-992   return result;
-993 };
-994 
-995 /**
-996  * Matcher that compares the actual to the expected using ===.
-997  *
-998  * @param expected
-999  */
-1000 jasmine.Matchers.prototype.toBe = function(expected) {
-1001   return this.report(this.actual === expected, 'Expected<br /><br />' + jasmine.Matchers.pp(expected)
-1002     + '<br /><br />to be the same object as<br /><br />' + jasmine.Matchers.pp(this.actual)
-1003     + '<br />');
-1004 };
-1005 
-1006 /**
-1007  * Matcher that compares the actual to the expected using !==
-1008  * @param expected
-1009  */
-1010 jasmine.Matchers.prototype.toNotBe = function(expected) {
-1011   return this.report(this.actual !== expected, 'Expected<br /><br />' + jasmine.Matchers.pp(expected)
-1012     + '<br /><br />to be a different object from actual, but they were the same.');
-1013 };
-1014 
-1015 /**
-1016  * Matcher that compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.
-1017  *
-1018  * @param expected
-1019  */
-1020 jasmine.Matchers.prototype.toEqual = function(expected) {
-1021   var mismatchKeys = [];
-1022   var mismatchValues = [];
-1023 
-1024   var formatMismatches = function(name, array) {
-1025     if (array.length == 0) return '';
-1026     var errorOutput = '<br /><br />Different ' + name + ':<br />';
-1027     for (var i = 0; i < array.length; i++) {
-1028       errorOutput += array[i] + '<br />';
-1029     }
-1030     return errorOutput;
-1031   };
-1032 
-1033   return this.report(this.env.equals_(this.actual, expected, mismatchKeys, mismatchValues),
-1034     'Expected<br /><br />' + jasmine.Matchers.pp(expected)
-1035       + '<br /><br />but got<br /><br />' + jasmine.Matchers.pp(this.actual)
-1036       + '<br />'
-1037       + formatMismatches('Keys', mismatchKeys)
-1038       + formatMismatches('Values', mismatchValues), {
-1039     matcherName: 'toEqual', expected: expected, actual: this.actual
-1040   });
-1041 };
-1042 /** @deprecated */
-1043 jasmine.Matchers.prototype.should_equal = jasmine.Matchers.prototype.toEqual;
-1044 
-1045 /**
-1046  * Matcher that compares the actual to the expected using the ! of jasmine.Matchers.toEqual
-1047  * @param expected
-1048  */
-1049 jasmine.Matchers.prototype.toNotEqual = function(expected) {
-1050   return this.report(!this.env.equals_(this.actual, expected),
-1051     'Expected ' + jasmine.Matchers.pp(expected) + ' to not equal ' + jasmine.Matchers.pp(this.actual) + ', but it does.');
-1052 };
-1053 /** @deprecated */
-1054 jasmine.Matchers.prototype.should_not_equal = jasmine.Matchers.prototype.toNotEqual;
-1055 
-1056 /**
-1057  * Matcher that compares the actual to the expected using a regular expression.  Constructs a RegExp, so takes
-1058  * a pattern or a String.
-1059  *
-1060  * @param reg_exp
-1061  */
-1062 jasmine.Matchers.prototype.toMatch = function(reg_exp) {
-1063   return this.report((new RegExp(reg_exp).test(this.actual)),
-1064     'Expected ' + jasmine.Matchers.pp(this.actual) + ' to match ' + reg_exp + '.');
-1065 };
-1066 /** @deprecated */
-1067 jasmine.Matchers.prototype.should_match = jasmine.Matchers.prototype.toMatch;
-1068 
-1069 /**
-1070  * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
-1071  * @param reg_exp
-1072  */
-1073 jasmine.Matchers.prototype.toNotMatch = function(reg_exp) {
-1074   return this.report((!new RegExp(reg_exp).test(this.actual)),
-1075     'Expected ' + jasmine.Matchers.pp(this.actual) + ' to not match ' + reg_exp + '.');
-1076 };
-1077 /** @deprecated */
-1078 jasmine.Matchers.prototype.should_not_match = jasmine.Matchers.prototype.toNotMatch;
-1079 
-1080 /**
-1081  * Matcher that compares the acutal to undefined.
-1082  */
-1083 jasmine.Matchers.prototype.toBeDefined = function() {
-1084   return this.report((this.actual !== undefined),
-1085     'Expected a value to be defined but it was undefined.');
-1086 };
-1087 /** @deprecated */
-1088 jasmine.Matchers.prototype.should_be_defined = jasmine.Matchers.prototype.toBeDefined;
-1089 
-1090 /**
-1091  * Matcher that compares the actual to null.
-1092  *
-1093  */
-1094 jasmine.Matchers.prototype.toBeNull = function() {
-1095   return this.report((this.actual === null),
-1096     'Expected a value to be null but it was ' + jasmine.Matchers.pp(this.actual) + '.');
-1097 };
-1098 /** @deprecated */
-1099 jasmine.Matchers.prototype.should_be_null = jasmine.Matchers.prototype.toBeNull;
-1100 
-1101 /**
-1102  * Matcher that boolean not-nots the actual.
-1103  */
-1104 jasmine.Matchers.prototype.toBeTruthy = function() {
-1105   return this.report(!!this.actual,
-1106     'Expected a value to be truthy but it was ' + jasmine.Matchers.pp(this.actual) + '.');
-1107 };
-1108 /** @deprecated */
-1109 jasmine.Matchers.prototype.should_be_truthy = jasmine.Matchers.prototype.toBeTruthy;
-1110 
-1111 /**
-1112  * Matcher that boolean nots the actual.
-1113  */
-1114 jasmine.Matchers.prototype.toBeFalsy = function() {
-1115   return this.report(!this.actual,
-1116     'Expected a value to be falsy but it was ' + jasmine.Matchers.pp(this.actual) + '.');
-1117 };
-1118 /** @deprecated */
-1119 jasmine.Matchers.prototype.should_be_falsy = jasmine.Matchers.prototype.toBeFalsy;
-1120 
-1121 /**
-1122  * Matcher that checks to see if the acutal, a Jasmine spy, was called.
-1123  */
-1124 jasmine.Matchers.prototype.wasCalled = function() {
-1125   if (!this.actual || !this.actual.isSpy) {
-1126     return this.report(false, 'Expected a spy, but got ' + jasmine.Matchers.pp(this.actual) + '.');
-1127   }
-1128   if (arguments.length > 0) {
-1129     return this.report(false, 'wasCalled matcher does not take arguments');
-1130   }
-1131   return this.report((this.actual.wasCalled),
-1132     'Expected spy "' + this.actual.identity + '" to have been called, but it was not.');
-1133 };
-1134 /** @deprecated */
-1135 jasmine.Matchers.prototype.was_called = jasmine.Matchers.prototype.wasCalled;
-1136 
-1137 /**
-1138  * Matcher that checks to see if the acutal, a Jasmine spy, was not called.
-1139  */
-1140 jasmine.Matchers.prototype.wasNotCalled = function() {
-1141   if (!this.actual || !this.actual.isSpy) {
-1142     return this.report(false, 'Expected a spy, but got ' + jasmine.Matchers.pp(this.actual) + '.');
-1143   }
-1144   return this.report((!this.actual.wasCalled),
-1145     'Expected spy "' + this.actual.identity + '" to not have been called, but it was.');
-1146 };
-1147 /** @deprecated */
-1148 jasmine.Matchers.prototype.was_not_called = jasmine.Matchers.prototype.wasNotCalled;
-1149 
-1150 /**
-1151  * Matcher that checks to see if the acutal, a Jasmine spy, was called with a set of parameters.
-1152  *
-1153  * @example
-1154  *
-1155  */
-1156 jasmine.Matchers.prototype.wasCalledWith = function() {
-1157   if (!this.actual || !this.actual.isSpy) {
-1158     return this.report(false, 'Expected a spy, but got ' + jasmine.Matchers.pp(this.actual) + '.', {
-1159       matcherName: 'wasCalledWith'
-1160     });
-1161   }
-1162 
-1163   var args = jasmine.util.argsToArray(arguments);
-1164 
-1165   return this.report(this.env.contains_(this.actual.argsForCall, args),
-1166     'Expected ' + jasmine.Matchers.pp(this.actual.argsForCall) + ' to contain ' + jasmine.Matchers.pp(args) + ', but it does not.', {
-1167     matcherName: 'wasCalledWith', expected: args, actual: this.actual.argsForCall
-1168   });
-1169 };
-1170 
-1171 /**
-1172  * Matcher that checks that the expected item is an element in the actual Array.
-1173  *
-1174  * @param {Object} item
-1175  */
-1176 jasmine.Matchers.prototype.toContain = function(item) {
-1177   return this.report(this.env.contains_(this.actual, item),
-1178     'Expected ' + jasmine.Matchers.pp(this.actual) + ' to contain ' + jasmine.Matchers.pp(item) + ', but it does not.', {
-1179     matcherName: 'toContain', expected: item, actual: this.actual
-1180   });
-1181 };
-1182 
-1183 /**
-1184  * Matcher that checks that the expected item is NOT an element in the actual Array.
-1185  *
-1186  * @param {Object} item
-1187  */
-1188 jasmine.Matchers.prototype.toNotContain = function(item) {
-1189   return this.report(!this.env.contains_(this.actual, item),
-1190     'Expected ' + jasmine.Matchers.pp(this.actual) + ' not to contain ' + jasmine.Matchers.pp(item) + ', but it does.');
-1191 };
-1192 
-1193 jasmine.Matchers.prototype.toBeLessThan = function(expected) {
-1194   return this.report(this.actual < expected,
-1195     'Expected ' + jasmine.Matchers.pp(this.actual) + ' to be less than ' + jasmine.Matchers.pp(expected) + ', but it was not.');
-1196 };
-1197 
-1198 jasmine.Matchers.prototype.toBeGreaterThan = function(expected) {
-1199   return this.report(this.actual > expected,
-1200     'Expected ' + jasmine.Matchers.pp(this.actual) + ' to be greater than ' + jasmine.Matchers.pp(expected) + ', but it was not.');
-1201 };
-1202 
-1203 /**
-1204  * Matcher that checks that the expected exception was thrown by the actual.
-1205  *
-1206  * @param {String} expectedException
-1207  */
-1208 jasmine.Matchers.prototype.toThrow = function(expectedException) {
-1209   var exception = null;
-1210   try {
-1211     this.actual();
-1212   } catch (e) {
-1213     exception = e;
-1214   }
-1215   if (expectedException !== undefined) {
-1216     if (exception == null) {
-1217       return this.report(false, "Expected function to throw " + jasmine.Matchers.pp(expectedException) + ", but it did not.");
-1218     }
-1219     return this.report(
-1220       this.env.equals_(
-1221         exception.message || exception,
-1222         expectedException.message || expectedException),
-1223       "Expected function to throw " + jasmine.Matchers.pp(expectedException) + ", but it threw " + jasmine.Matchers.pp(exception) + ".");
-1224   } else {
-1225     return this.report(exception != null, "Expected function to throw an exception, but it did not.");
-1226   }
-1227 };
-1228 
-1229 jasmine.Matchers.Any = function(expectedClass) {
-1230   this.expectedClass = expectedClass;
-1231 };
-1232 
-1233 jasmine.Matchers.Any.prototype.matches = function(other) {
-1234   if (this.expectedClass == String) {
-1235     return typeof other == 'string' || other instanceof String;
-1236   }
-1237 
-1238   if (this.expectedClass == Number) {
-1239     return typeof other == 'number' || other instanceof Number;
-1240   }
-1241 
-1242   if (this.expectedClass == Function) {
-1243     return typeof other == 'function' || other instanceof Function;
-1244   }
-1245 
-1246   if (this.expectedClass == Object) {
-1247     return typeof other == 'object';
-1248   }
-1249 
-1250   return other instanceof this.expectedClass;
-1251 };
-1252 
-1253 jasmine.Matchers.Any.prototype.toString = function() {
-1254   return '<jasmine.any(' + this.expectedClass + ')>';
-1255 };
-1256 
-1257 /**
-1258  * @constructor
-1259  */
-1260 jasmine.MultiReporter = function() {
-1261   this.subReporters_ = [];
-1262 };
-1263 jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter);
-1264 
-1265 jasmine.MultiReporter.prototype.addReporter = function(reporter) {
-1266   this.subReporters_.push(reporter);
-1267 };
-1268 
-1269 (function() {
-1270   var functionNames = ["reportRunnerStarting", "reportRunnerResults", "reportSuiteResults", "reportSpecResults", "log"];
-1271   for (var i = 0; i < functionNames.length; i++) {
-1272     var functionName = functionNames[i];
-1273     jasmine.MultiReporter.prototype[functionName] = (function(functionName) {
-1274       return function() {
-1275         for (var j = 0; j < this.subReporters_.length; j++) {
-1276           var subReporter = this.subReporters_[j];
-1277           if (subReporter[functionName]) {
-1278             subReporter[functionName].apply(subReporter, arguments);
-1279           }
-1280         }
-1281       };
-1282     })(functionName);
-1283   }
-1284 })();
-1285 /**
-1286  * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults
-1287  *
-1288  * @constructor
-1289  */
-1290 jasmine.NestedResults = function() {
-1291   /**
-1292    * The total count of results
-1293    */
-1294   this.totalCount = 0;
-1295   /**
-1296    * Number of passed results
-1297    */
-1298   this.passedCount = 0;
-1299   /**
-1300    * Number of failed results
-1301    */
-1302   this.failedCount = 0;
-1303   /**
-1304    * Was this suite/spec skipped?
-1305    */
-1306   this.skipped = false;
-1307   /**
-1308    * @ignore
-1309    */
-1310   this.items_ = [];
-1311 };
-1312 
-1313 /**
-1314  * Roll up the result counts.
-1315  *
-1316  * @param result
-1317  */
-1318 jasmine.NestedResults.prototype.rollupCounts = function(result) {
-1319   this.totalCount += result.totalCount;
-1320   this.passedCount += result.passedCount;
-1321   this.failedCount += result.failedCount;
-1322 };
-1323 
-1324 /**
-1325  * Tracks a result's message.
-1326  * @param message
-1327  */
-1328 jasmine.NestedResults.prototype.log = function(message) {
-1329   this.items_.push(new jasmine.MessageResult(message));
-1330 };
-1331 
-1332 /**
-1333  * Getter for the results: message & results.
-1334  */
-1335 jasmine.NestedResults.prototype.getItems = function() {
-1336   return this.items_;
-1337 };
-1338 
-1339 /**
-1340  * Adds a result, tracking counts (total, passed, & failed)
-1341  * @param {jasmine.ExpectationResult|jasmine.NestedResults} result
-1342  */
-1343 jasmine.NestedResults.prototype.addResult = function(result) {
-1344   if (result.type != 'MessageResult') {
-1345     if (result.items_) {
-1346       this.rollupCounts(result);
-1347     } else {
-1348       this.totalCount++;
-1349       if (result.passed()) {
-1350         this.passedCount++;
-1351       } else {
-1352         this.failedCount++;
-1353       }
-1354     }
-1355   }
-1356   this.items_.push(result);
-1357 };
-1358 
-1359 /**
-1360  * @returns {Boolean} True if <b>everything</b> below passed
-1361  */
-1362 jasmine.NestedResults.prototype.passed = function() {
-1363   return this.passedCount === this.totalCount;
-1364 };
-1365 /**
-1366  * Base class for pretty printing for expectation results.
-1367  */
-1368 jasmine.PrettyPrinter = function() {
-1369   this.ppNestLevel_ = 0;
-1370 };
-1371 
-1372 /**
-1373  * Formats a value in a nice, human-readable string.
-1374  *
-1375  * @param value
-1376  * @returns {String}
-1377  */
-1378 jasmine.PrettyPrinter.prototype.format = function(value) {
-1379   if (this.ppNestLevel_ > 40) {
-1380     //    return '(jasmine.pp nested too deeply!)';
-1381     throw new Error('jasmine.PrettyPrinter: format() nested too deeply!');
-1382   }
-1383 
-1384   this.ppNestLevel_++;
-1385   try {
-1386     if (value === undefined) {
-1387       this.emitScalar('undefined');
-1388     } else if (value === null) {
-1389       this.emitScalar('null');
-1390     } else if (value.navigator && value.frames && value.setTimeout) {
-1391       this.emitScalar('<window>');
-1392     } else if (value instanceof jasmine.Matchers.Any) {
-1393       this.emitScalar(value.toString());
-1394     } else if (typeof value === 'string') {
-1395       this.emitString(value);
-1396     } else if (typeof value === 'function') {
-1397       this.emitScalar('Function');
-1398     } else if (typeof value.nodeType === 'number') {
-1399       this.emitScalar('HTMLNode');
-1400     } else if (value instanceof Date) {
-1401       this.emitScalar('Date(' + value + ')');
-1402     } else if (value.__Jasmine_been_here_before__) {
-1403       this.emitScalar('<circular reference: ' + (jasmine.isArray_(value) ? 'Array' : 'Object') + '>');
-1404     } else if (jasmine.isArray_(value) || typeof value == 'object') {
-1405       value.__Jasmine_been_here_before__ = true;
-1406       if (jasmine.isArray_(value)) {
-1407         this.emitArray(value);
-1408       } else {
-1409         this.emitObject(value);
-1410       }
-1411       delete value.__Jasmine_been_here_before__;
-1412     } else {
-1413       this.emitScalar(value.toString());
-1414     }
-1415   } finally {
-1416     this.ppNestLevel_--;
-1417   }
-1418 };
-1419 
-1420 jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
-1421   for (var property in obj) {
-1422     if (property == '__Jasmine_been_here_before__') continue;
-1423     fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) != null) : false);
-1424   }
-1425 };
-1426 
-1427 jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_;
-1428 jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_;
-1429 jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_;
-1430 jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_;
-1431 
-1432 jasmine.StringPrettyPrinter = function() {
-1433   jasmine.PrettyPrinter.call(this);
-1434 
-1435   this.string = '';
-1436 };
-1437 jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter);
-1438 
-1439 jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) {
-1440   this.append(value);
-1441 };
-1442 
-1443 jasmine.StringPrettyPrinter.prototype.emitString = function(value) {
-1444   this.append("'" + value + "'");
-1445 };
-1446 
-1447 jasmine.StringPrettyPrinter.prototype.emitArray = function(array) {
-1448   this.append('[ ');
-1449   for (var i = 0; i < array.length; i++) {
-1450     if (i > 0) {
-1451       this.append(', ');
-1452     }
-1453     this.format(array[i]);
-1454   }
-1455   this.append(' ]');
-1456 };
-1457 
-1458 jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) {
-1459   var self = this;
-1460   this.append('{ ');
-1461   var first = true;
-1462 
-1463   this.iterateObject(obj, function(property, isGetter) {
-1464     if (first) {
-1465       first = false;
-1466     } else {
-1467       self.append(', ');
-1468     }
-1469 
-1470     self.append(property);
-1471     self.append(' : ');
-1472     if (isGetter) {
-1473       self.append('<getter>');
-1474     } else {
-1475       self.format(obj[property]);
-1476     }
-1477   });
-1478 
-1479   this.append(' }');
-1480 };
-1481 
-1482 jasmine.StringPrettyPrinter.prototype.append = function(value) {
-1483   this.string += value;
-1484 };
-1485 jasmine.Queue = function(env) {
-1486   this.env = env;
-1487   this.blocks = [];
-1488   this.running = false;
-1489   this.index = 0;
-1490   this.offset = 0;
-1491 };
-1492 
-1493 jasmine.Queue.prototype.addBefore = function(block) {
-1494   this.blocks.unshift(block);
-1495 };
-1496 
-1497 jasmine.Queue.prototype.add = function(block) {
-1498   this.blocks.push(block);
-1499 };
-1500 
-1501 jasmine.Queue.prototype.insertNext = function(block) {
-1502   this.blocks.splice((this.index + this.offset + 1), 0, block);
-1503   this.offset++;
-1504 };
-1505 
-1506 jasmine.Queue.prototype.start = function(onComplete) {
-1507   this.running = true;
-1508   this.onComplete = onComplete;
-1509   this.next_();
-1510 };
-1511 
-1512 jasmine.Queue.prototype.isRunning = function() {
-1513   return this.running;
-1514 };
-1515 
-1516 jasmine.Queue.LOOP_DONT_RECURSE = true;
-1517 
-1518 jasmine.Queue.prototype.next_ = function() {
-1519   var self = this;
-1520   var goAgain = true;
-1521 
-1522   while (goAgain) {
-1523     goAgain = false;
-1524     
-1525     if (self.index < self.blocks.length) {
-1526       var calledSynchronously = true;
-1527       var completedSynchronously = false;
-1528 
-1529       var onComplete = function () {
-1530         if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {
-1531           completedSynchronously = true;
-1532           return;
-1533         }
-1534 
-1535         self.offset = 0;
-1536         self.index++;
-1537 
-1538         var now = new Date().getTime();
-1539         if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {
-1540           self.env.lastUpdate = now;
-1541           self.env.setTimeout(function() {
-1542             self.next_();
-1543           }, 0);
-1544         } else {
-1545           if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {
-1546             goAgain = true;
-1547           } else {
-1548             self.next_();
-1549           }
-1550         }
-1551       };
-1552       self.blocks[self.index].execute(onComplete);
-1553 
-1554       calledSynchronously = false;
-1555       if (completedSynchronously) {
-1556         onComplete();
-1557       }
-1558       
-1559     } else {
-1560       self.running = false;
-1561       if (self.onComplete) {
-1562         self.onComplete();
-1563       }
-1564     }
-1565   }
-1566 };
-1567 
-1568 jasmine.Queue.prototype.results = function() {
-1569   var results = new jasmine.NestedResults();
-1570   for (var i = 0; i < this.blocks.length; i++) {
-1571     if (this.blocks[i].results) {
-1572       results.addResult(this.blocks[i].results());
-1573     }
-1574   }
-1575   return results;
-1576 };
-1577 
-1578 
-1579 /* JasmineReporters.reporter
-1580  *    Base object that will get called whenever a Spec, Suite, or Runner is done.  It is up to
-1581  *    descendants of this object to do something with the results (see json_reporter.js)
-1582  */
-1583 jasmine.Reporters = {};
-1584 
-1585 jasmine.Reporters.reporter = function(callbacks) {
-1586   var that = {
-1587     callbacks: callbacks || {},
-1588 
-1589     doCallback: function(callback, results) {
-1590       if (callback) {
-1591         callback(results);
-1592       }
-1593     },
-1594 
-1595     reportRunnerResults: function(runner) {
-1596       that.doCallback(that.callbacks.runnerCallback, runner);
-1597     },
-1598     reportSuiteResults:  function(suite) {
-1599       that.doCallback(that.callbacks.suiteCallback, suite);
-1600     },
-1601     reportSpecResults:   function(spec) {
-1602       that.doCallback(that.callbacks.specCallback, spec);
-1603     },
-1604     log: function (str) {
-1605       if (console && console.log) console.log(str);
-1606     }
-1607   };
-1608 
-1609   return that;
-1610 };
-1611 
-1612 /**
-1613  * Runner
-1614  *
-1615  * @constructor
-1616  * @param {jasmine.Env} env
-1617  */
-1618 jasmine.Runner = function(env) {
-1619   var self = this;
-1620   self.env = env;
-1621   self.queue = new jasmine.Queue(env);
-1622   self.before_ = [];
-1623   self.after_ = [];
-1624   self.suites_ = [];
-1625 };
-1626 
-1627 jasmine.Runner.prototype.execute = function() {
-1628   var self = this;
-1629   if (self.env.reporter.reportRunnerStarting) {
-1630     self.env.reporter.reportRunnerStarting(this);
-1631   }
-1632   self.queue.start(function () {
-1633     self.finishCallback();
-1634   });
-1635 };
-1636 
-1637 jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) {
-1638   beforeEachFunction.typeName = 'beforeEach';
-1639   this.before_.push(beforeEachFunction);
-1640 };
-1641 
-1642 jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
-1643   afterEachFunction.typeName = 'afterEach';
-1644   this.after_.push(afterEachFunction);
-1645 };
-1646 
-1647 
-1648 jasmine.Runner.prototype.finishCallback = function() {
-1649   this.env.reporter.reportRunnerResults(this);
-1650 };
-1651 
-1652 jasmine.Runner.prototype.addSuite = function(suite) {
-1653   this.suites_.push(suite);
-1654 };
-1655 
-1656 jasmine.Runner.prototype.add = function(block) {
-1657   if (block instanceof jasmine.Suite) {
-1658     this.addSuite(block);
-1659   }
-1660   this.queue.add(block);
-1661 };
-1662 
-1663 /** @deprecated */
-1664 jasmine.Runner.prototype.getAllSuites = function() {
-1665   return this.suites_;
-1666 };
-1667 
-1668 jasmine.Runner.prototype.specs = function () {
-1669   var suites = this.suites();
-1670   var specs = [];
-1671   for (var i = 0; i < suites.length; i++) {
-1672     specs = specs.concat(suites[i].specs());
-1673   }
-1674   return specs;
-1675 };
-1676 
-1677 
-1678 jasmine.Runner.prototype.suites = function() {
-1679   return this.suites_;
-1680 };
-1681 
-1682 jasmine.Runner.prototype.results = function() {
-1683   return this.queue.results();
-1684 };
-1685 
-1686 /** @deprecated */
-1687 jasmine.Runner.prototype.getResults = function() {
-1688   return this.queue.results();
-1689 };
-1690 /**
-1691  * Internal representation of a Jasmine specification, or test.
-1692  *
-1693  * @constructor
-1694  * @param {jasmine.Env} env
-1695  * @param {jasmine.Suite} suite
-1696  * @param {String} description
-1697  */
-1698 jasmine.Spec = function(env, suite, description) {
-1699   if (!env) {
-1700     throw new Error('jasmine.Env() required');
-1701   }
-1702   ;
-1703   if (!suite) {
-1704     throw new Error('jasmine.Suite() required');
-1705   }
-1706   ;
-1707   var spec = this;
-1708   spec.id = env.nextSpecId ? env.nextSpecId() : null;
-1709   spec.env = env;
-1710   spec.suite = suite;
-1711   spec.description = description;
-1712   spec.queue = new jasmine.Queue(env);
-1713 
-1714   spec.afterCallbacks = [];
-1715   spec.spies_ = [];
-1716 
-1717   spec.results_ = new jasmine.NestedResults();
-1718   spec.results_.description = description;
-1719   spec.matchersClass = null;
-1720 };
-1721 
-1722 jasmine.Spec.prototype.getFullName = function() {
-1723   return this.suite.getFullName() + ' ' + this.description + '.';
-1724 };
-1725 
-1726 
-1727 jasmine.Spec.prototype.results = function() {
-1728   return this.results_;
-1729 };
-1730 
-1731 jasmine.Spec.prototype.log = function(message) {
-1732   return this.results_.log(message);
-1733 };
-1734 
-1735 /** @deprecated */
-1736 jasmine.Spec.prototype.getResults = function() {
-1737   return this.results_;
-1738 };
-1739 
-1740 jasmine.Spec.prototype.runs = function (func) {
-1741   var block = new jasmine.Block(this.env, func, this);
-1742   this.addToQueue(block);
-1743   return this;
-1744 };
-1745 
-1746 jasmine.Spec.prototype.addToQueue = function (block) {
-1747   if (this.queue.isRunning()) {
-1748     this.queue.insertNext(block);
-1749   } else {
-1750     this.queue.add(block);
-1751   }
-1752 };
-1753 
-1754 /**
-1755  * @private
-1756  * @deprecated
-1757  */
-1758 jasmine.Spec.prototype.expects_that = function(actual) {
-1759   return this.expect(actual);
-1760 };
-1761 
-1762 jasmine.Spec.prototype.expect = function(actual) {
-1763   return new (this.getMatchersClass_())(this.env, actual, this.results_);
-1764 };
-1765 
-1766 jasmine.Spec.prototype.waits = function(timeout) {
-1767   var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this);
-1768   this.addToQueue(waitsFunc);
-1769   return this;
-1770 };
-1771 
-1772 jasmine.Spec.prototype.waitsFor = function(timeout, latchFunction, timeoutMessage) {
-1773   var waitsForFunc = new jasmine.WaitsForBlock(this.env, timeout, latchFunction, timeoutMessage, this);
-1774   this.addToQueue(waitsForFunc);
-1775   return this;
-1776 };
-1777 
-1778 jasmine.Spec.prototype.fail = function (e) {
-1779   this.results_.addResult(new jasmine.ExpectationResult(false, e ? jasmine.util.formatException(e) : null, null));
-1780 };
-1781 
-1782 jasmine.Spec.prototype.getMatchersClass_ = function() {
-1783   return this.matchersClass || jasmine.Matchers;
-1784 };
-1785 
-1786 jasmine.Spec.prototype.addMatchers = function(matchersPrototype) {
-1787   var parent = this.getMatchersClass_();
-1788   var newMatchersClass = function() {
-1789     parent.apply(this, arguments);
-1790   };
-1791   jasmine.util.inherit(newMatchersClass, parent);
-1792   for (var method in matchersPrototype) {
-1793     newMatchersClass.prototype[method] = matchersPrototype[method];
-1794   }
-1795   this.matchersClass = newMatchersClass;
-1796 };
-1797 
-1798 jasmine.Spec.prototype.finishCallback = function() {
-1799   this.env.reporter.reportSpecResults(this);
-1800 };
-1801 
-1802 jasmine.Spec.prototype.finish = function(onComplete) {
-1803   this.removeAllSpies();
-1804   this.finishCallback();
-1805   if (onComplete) {
-1806     onComplete();
-1807   }
-1808 };
-1809 
-1810 jasmine.Spec.prototype.after = function(doAfter, test) {
-1811 
-1812   if (this.queue.isRunning()) {
-1813     this.queue.add(new jasmine.Block(this.env, doAfter, this));
-1814   } else {
-1815     this.afterCallbacks.unshift(doAfter);
-1816   }
-1817 };
-1818 
-1819 jasmine.Spec.prototype.execute = function(onComplete) {
-1820   var spec = this;
-1821   if (!spec.env.specFilter(spec)) {
-1822     spec.results_.skipped = true;
-1823     spec.finish(onComplete);
-1824     return;
-1825   }
-1826   this.env.reporter.log('>> Jasmine Running ' + this.suite.description + ' ' + this.description + '...');
-1827 
-1828   spec.env.currentSpec = spec;
-1829   spec.env.currentlyRunningTests = true;
-1830 
-1831   spec.addBeforesAndAftersToQueue();
-1832 
-1833   spec.queue.start(function () {
-1834     spec.finish(onComplete);
-1835   });
-1836   spec.env.currentlyRunningTests = false;
-1837 };
-1838 
-1839 jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() {
-1840   var runner = this.env.currentRunner();
-1841   for (var suite = this.suite; suite; suite = suite.parentSuite) {
-1842     for (var i = 0; i < suite.before_.length; i++) {
-1843       this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this));
-1844     }
-1845   }
-1846   for (var i = 0; i < runner.before_.length; i++) {
-1847     this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this));
-1848   }
-1849   for (i = 0; i < this.afterCallbacks.length; i++) {
-1850     this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this));
-1851   }
-1852   for (suite = this.suite; suite; suite = suite.parentSuite) {
-1853     for (var i = 0; i < suite.after_.length; i++) {
-1854       this.queue.add(new jasmine.Block(this.env, suite.after_[i], this));
-1855     }
-1856   }
-1857   for (var i = 0; i < runner.after_.length; i++) {
-1858     this.queue.add(new jasmine.Block(this.env, runner.after_[i], this));
-1859   }
-1860 };
-1861 
-1862 jasmine.Spec.prototype.explodes = function() {
-1863   throw 'explodes function should not have been called';
-1864 };
-1865 
-1866 jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) {
-1867   if (obj == undefined) {
-1868     throw "spyOn could not find an object to spy upon for " + methodName + "()";
-1869   }
-1870 
-1871   if (!ignoreMethodDoesntExist && obj[methodName] === undefined) {
-1872     throw methodName + '() method does not exist';
-1873   }
-1874 
-1875   if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) {
-1876     throw new Error(methodName + ' has already been spied upon');
-1877   }
-1878 
-1879   var spyObj = jasmine.createSpy(methodName);
-1880 
-1881   this.spies_.push(spyObj);
-1882   spyObj.baseObj = obj;
-1883   spyObj.methodName = methodName;
-1884   spyObj.originalValue = obj[methodName];
-1885 
-1886   obj[methodName] = spyObj;
-1887 
-1888   return spyObj;
-1889 };
-1890 
-1891 jasmine.Spec.prototype.removeAllSpies = function() {
-1892   for (var i = 0; i < this.spies_.length; i++) {
-1893     var spy = this.spies_[i];
-1894     spy.baseObj[spy.methodName] = spy.originalValue;
-1895   }
-1896   this.spies_ = [];
-1897 };
-1898 
-1899 /**
-1900  * Internal representation of a Jasmine suite.
-1901  *
-1902  * @constructor
-1903  * @param {jasmine.Env} env
-1904  * @param {String} description
-1905  * @param {Function} specDefinitions
-1906  * @param {jasmine.Suite} parentSuite
-1907  */
-1908 jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
-1909   var self = this;
-1910   self.id = env.nextSuiteId ? env.nextSuiteId() : null;
-1911   self.description = description;
-1912   self.queue = new jasmine.Queue(env);
-1913   self.parentSuite = parentSuite;
-1914   self.env = env;
-1915   self.before_ = [];
-1916   self.after_ = [];
-1917   self.specs_ = [];
-1918 };
-1919 
-1920 jasmine.Suite.prototype.getFullName = function() {
-1921   var fullName = this.description;
-1922   for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
-1923     fullName = parentSuite.description + ' ' + fullName;
-1924   }
-1925   return fullName;
-1926 };
-1927 
-1928 jasmine.Suite.prototype.finish = function(onComplete) {
-1929   this.env.reporter.reportSuiteResults(this);
-1930   this.finished = true;
-1931   if (typeof(onComplete) == 'function') {
-1932     onComplete();
-1933   }
-1934 };
-1935 
-1936 jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
-1937   beforeEachFunction.typeName = 'beforeEach';
-1938   this.before_.push(beforeEachFunction);
-1939 };
-1940 
-1941 jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
-1942   afterEachFunction.typeName = 'afterEach';
-1943   this.after_.push(afterEachFunction);
-1944 };
-1945 
-1946 /** @deprecated */
-1947 jasmine.Suite.prototype.getResults = function() {
-1948   return this.queue.results();
-1949 };
-1950 
-1951 jasmine.Suite.prototype.results = function() {
-1952   return this.queue.results();
-1953 };
-1954 
-1955 jasmine.Suite.prototype.add = function(block) {
-1956   if (block instanceof jasmine.Suite) {
-1957     this.env.currentRunner().addSuite(block);
-1958   } else {
-1959     this.specs_.push(block);
-1960   }
-1961   this.queue.add(block);
-1962 };
-1963 
-1964 /** @deprecated */
-1965 jasmine.Suite.prototype.specCount = function() {
-1966   return this.specs_.length;
-1967 };
-1968 
-1969 jasmine.Suite.prototype.specs = function() {
-1970   return this.specs_;
-1971 };
-1972 
-1973 jasmine.Suite.prototype.execute = function(onComplete) {
-1974   var self = this;
-1975   this.queue.start(function () {
-1976     self.finish(onComplete);
-1977   });
-1978 };
-1979 jasmine.WaitsBlock = function(env, timeout, spec) {
-1980   this.timeout = timeout;
-1981   jasmine.Block.call(this, env, null, spec);
-1982 };
-1983 
-1984 jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block);
-1985 
-1986 jasmine.WaitsBlock.prototype.execute = function (onComplete) {
-1987   this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...');
-1988   this.env.setTimeout(function () {
-1989     onComplete();
-1990   }, this.timeout);
-1991 };
-1992 jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
-1993   this.timeout = timeout;
-1994   this.latchFunction = latchFunction;
-1995   this.message = message;
-1996   this.totalTimeSpentWaitingForLatch = 0;
-1997   jasmine.Block.call(this, env, null, spec);
-1998 };
-1999 
-2000 jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block);
-2001 
-2002 jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 100;
-2003 
-2004 jasmine.WaitsForBlock.prototype.execute = function (onComplete) {
-2005   var self = this;
-2006   self.env.reporter.log('>> Jasmine waiting for ' + (self.message || 'something to happen'));
-2007   var latchFunctionResult;
-2008   try {
-2009     latchFunctionResult = self.latchFunction.apply(self.spec);
-2010   } catch (e) {
-2011     self.spec.fail(e);
-2012     onComplete();
-2013     return;
-2014   }
-2015 
-2016   if (latchFunctionResult) {
-2017     onComplete();
-2018   } else if (self.totalTimeSpentWaitingForLatch >= self.timeout) {
-2019     var message = 'timed out after ' + self.timeout + ' msec waiting for ' + (self.message || 'something to happen');
-2020     self.spec.fail({
-2021       name: 'timeout',
-2022       message: message
-2023     });
-2024     self.spec._next();
-2025   } else {
-2026     self.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;
-2027     self.env.setTimeout(function () { self.execute(onComplete); }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);
-2028   }
-2029 };
-2030 // Mock setTimeout, clearTimeout
-2031 // Contributed by Pivotal Computer Systems, www.pivotalsf.com
-2032 
-2033 jasmine.FakeTimer = function() {
-2034   this.reset();
-2035 
-2036   var self = this;
-2037   self.setTimeout = function(funcToCall, millis) {
-2038     self.timeoutsMade++;
-2039     self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false);
-2040     return self.timeoutsMade;
-2041   };
-2042 
-2043   self.setInterval = function(funcToCall, millis) {
-2044     self.timeoutsMade++;
-2045     self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true);
-2046     return self.timeoutsMade;
-2047   };
-2048 
-2049   self.clearTimeout = function(timeoutKey) {
-2050     self.scheduledFunctions[timeoutKey] = undefined;
-2051   };
-2052 
-2053   self.clearInterval = function(timeoutKey) {
-2054     self.scheduledFunctions[timeoutKey] = undefined;
-2055   };
-2056 
-2057 };
-2058 
-2059 jasmine.FakeTimer.prototype.reset = function() {
-2060   this.timeoutsMade = 0;
-2061   this.scheduledFunctions = {};
-2062   this.nowMillis = 0;
-2063 };
-2064 
-2065 jasmine.FakeTimer.prototype.tick = function(millis) {
-2066   var oldMillis = this.nowMillis;
-2067   var newMillis = oldMillis + millis;
-2068   this.runFunctionsWithinRange(oldMillis, newMillis);
-2069   this.nowMillis = newMillis;
-2070 };
-2071 
-2072 jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
-2073   var scheduledFunc;
-2074   var funcsToRun = [];
-2075   for (var timeoutKey in this.scheduledFunctions) {
-2076     scheduledFunc = this.scheduledFunctions[timeoutKey];
-2077     if (scheduledFunc != undefined &&
-2078         scheduledFunc.runAtMillis >= oldMillis &&
-2079         scheduledFunc.runAtMillis <= nowMillis) {
-2080       funcsToRun.push(scheduledFunc);
-2081       this.scheduledFunctions[timeoutKey] = undefined;
-2082     }
-2083   }
-2084 
-2085   if (funcsToRun.length > 0) {
-2086     funcsToRun.sort(function(a, b) {
-2087       return a.runAtMillis - b.runAtMillis;
-2088     });
-2089     for (var i = 0; i < funcsToRun.length; ++i) {
-2090       try {
-2091         var funcToRun = funcsToRun[i];
-2092         this.nowMillis = funcToRun.runAtMillis;
-2093         funcToRun.funcToCall();
-2094         if (funcToRun.recurring) {
-2095           this.scheduleFunction(funcToRun.timeoutKey,
-2096             funcToRun.funcToCall,
-2097             funcToRun.millis,
-2098             true);
-2099         }
-2100       } catch(e) {
-2101       }
-2102     }
-2103     this.runFunctionsWithinRange(oldMillis, nowMillis);
-2104   }
-2105 };
-2106 
-2107 jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) {
-2108   this.scheduledFunctions[timeoutKey] = {
-2109     runAtMillis: this.nowMillis + millis,
-2110     funcToCall: funcToCall,
-2111     recurring: recurring,
-2112     timeoutKey: timeoutKey,
-2113     millis: millis
-2114   };
-2115 };
-2116 
-2117 
-2118 jasmine.Clock = {
-2119   defaultFakeTimer: new jasmine.FakeTimer(),
-2120 
-2121   reset: function() {
-2122     jasmine.Clock.assertInstalled();
-2123     jasmine.Clock.defaultFakeTimer.reset();
-2124   },
-2125 
-2126   tick: function(millis) {
-2127     jasmine.Clock.assertInstalled();
-2128     jasmine.Clock.defaultFakeTimer.tick(millis);
-2129   },
-2130 
-2131   runFunctionsWithinRange: function(oldMillis, nowMillis) {
-2132     jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis);
-2133   },
-2134 
-2135   scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) {
-2136     jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring);
-2137   },
-2138 
-2139   useMock: function() {
-2140     var spec = jasmine.getEnv().currentSpec;
-2141     spec.after(jasmine.Clock.uninstallMock);
-2142 
-2143     jasmine.Clock.installMock();
-2144   },
-2145 
-2146   installMock: function() {
-2147     jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer;
-2148   },
-2149 
-2150   uninstallMock: function() {
-2151     jasmine.Clock.assertInstalled();
-2152     jasmine.Clock.installed = jasmine.Clock.real;
-2153   },
-2154 
-2155   real: {
-2156     setTimeout: window.setTimeout,
-2157     clearTimeout: window.clearTimeout,
-2158     setInterval: window.setInterval,
-2159     clearInterval: window.clearInterval
-2160   },
-2161 
-2162   assertInstalled: function() {
-2163     if (jasmine.Clock.installed != jasmine.Clock.defaultFakeTimer) {
-2164       throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()");
-2165     }
-2166   },
-2167 
-2168   installed: null
-2169 };
-2170 jasmine.Clock.installed = jasmine.Clock.real;
-2171 
-2172 //else for IE support
-2173 window.setTimeout = function(funcToCall, millis) {
-2174   if (jasmine.Clock.installed.setTimeout.apply) {
-2175     return jasmine.Clock.installed.setTimeout.apply(this, arguments);
-2176   } else {
-2177     return jasmine.Clock.installed.setTimeout(funcToCall, millis);
-2178   }
-2179 };
-2180 
-2181 window.setInterval = function(funcToCall, millis) {
-2182   if (jasmine.Clock.installed.setInterval.apply) {
-2183     return jasmine.Clock.installed.setInterval.apply(this, arguments);
-2184   } else {
-2185     return jasmine.Clock.installed.setInterval(funcToCall, millis);
-2186   }
-2187 };
-2188 
-2189 window.clearTimeout = function(timeoutKey) {
-2190   if (jasmine.Clock.installed.clearTimeout.apply) {
-2191     return jasmine.Clock.installed.clearTimeout.apply(this, arguments);
-2192   } else {
-2193     return jasmine.Clock.installed.clearTimeout(timeoutKey);
-2194   }
-2195 };
-2196 
-2197 window.clearInterval = function(timeoutKey) {
-2198   if (jasmine.Clock.installed.clearTimeout.apply) {
-2199     return jasmine.Clock.installed.clearInterval.apply(this, arguments);
-2200   } else {
-2201   return jasmine.Clock.installed.clearInterval(timeoutKey);
-2202   }
-2203 };
-2204 
-2205 
\ No newline at end of file diff --git a/doc/symbols/src/lib_json2.js.html b/doc/symbols/src/lib_json2.js.html deleted file mode 100644 index c2095e2..0000000 --- a/doc/symbols/src/lib_json2.js.html +++ /dev/null @@ -1,486 +0,0 @@ -
  1 /*
-  2     http://www.JSON.org/json2.js
-  3     2009-08-17
-  4 
-  5     Public Domain.
-  6 
-  7     NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
-  8 
-  9     See http://www.JSON.org/js.html
- 10 
- 11     This file creates a global JSON object containing two methods: stringify
- 12     and parse.
- 13 
- 14         JSON.stringify(value, replacer, space)
- 15             value       any JavaScript value, usually an object or array.
- 16 
- 17             replacer    an optional parameter that determines how object
- 18                         values are stringified for objects. It can be a
- 19                         function or an array of strings.
- 20 
- 21             space       an optional parameter that specifies the indentation
- 22                         of nested structures. If it is omitted, the text will
- 23                         be packed without extra whitespace. If it is a number,
- 24                         it will specify the number of spaces to indent at each
- 25                         level. If it is a string (such as '\t' or ' '),
- 26                         it contains the characters used to indent at each level.
- 27 
- 28             This method produces a JSON text from a JavaScript value.
- 29 
- 30             When an object value is found, if the object contains a toJSON
- 31             method, its toJSON method will be called and the result will be
- 32             stringified. A toJSON method does not serialize: it returns the
- 33             value represented by the name/value pair that should be serialized,
- 34             or undefined if nothing should be serialized. The toJSON method
- 35             will be passed the key associated with the value, and this will be
- 36             bound to the value
- 37 
- 38             For example, this would serialize Dates as ISO strings.
- 39 
- 40                 Date.prototype.toJSON = function (key) {
- 41                     function f(n) {
- 42                         // Format integers to have at least two digits.
- 43                         return n < 10 ? '0' + n : n;
- 44                     }
- 45 
- 46                     return this.getUTCFullYear()   + '-' +
- 47                          f(this.getUTCMonth() + 1) + '-' +
- 48                          f(this.getUTCDate())      + 'T' +
- 49                          f(this.getUTCHours())     + ':' +
- 50                          f(this.getUTCMinutes())   + ':' +
- 51                          f(this.getUTCSeconds())   + 'Z';
- 52                 };
- 53 
- 54             You can provide an optional replacer method. It will be passed the
- 55             key and value of each member, with this bound to the containing
- 56             object. The value that is returned from your method will be
- 57             serialized. If your method returns undefined, then the member will
- 58             be excluded from the serialization.
- 59 
- 60             If the replacer parameter is an array of strings, then it will be
- 61             used to select the members to be serialized. It filters the results
- 62             such that only members with keys listed in the replacer array are
- 63             stringified.
- 64 
- 65             Values that do not have JSON representations, such as undefined or
- 66             functions, will not be serialized. Such values in objects will be
- 67             dropped; in arrays they will be replaced with null. You can use
- 68             a replacer function to replace those with JSON values.
- 69             JSON.stringify(undefined) returns undefined.
- 70 
- 71             The optional space parameter produces a stringification of the
- 72             value that is filled with line breaks and indentation to make it
- 73             easier to read.
- 74 
- 75             If the space parameter is a non-empty string, then that string will
- 76             be used for indentation. If the space parameter is a number, then
- 77             the indentation will be that many spaces.
- 78 
- 79             Example:
- 80 
- 81             text = JSON.stringify(['e', {pluribus: 'unum'}]);
- 82             // text is '["e",{"pluribus":"unum"}]'
- 83 
- 84 
- 85             text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
- 86             // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
- 87 
- 88             text = JSON.stringify([new Date()], function (key, value) {
- 89                 return this[key] instanceof Date ?
- 90                     'Date(' + this[key] + ')' : value;
- 91             });
- 92             // text is '["Date(---current time---)"]'
- 93 
- 94 
- 95         JSON.parse(text, reviver)
- 96             This method parses a JSON text to produce an object or array.
- 97             It can throw a SyntaxError exception.
- 98 
- 99             The optional reviver parameter is a function that can filter and
-100             transform the results. It receives each of the keys and values,
-101             and its return value is used instead of the original value.
-102             If it returns what it received, then the structure is not modified.
-103             If it returns undefined then the member is deleted.
-104 
-105             Example:
-106 
-107             // Parse the text. Values that look like ISO date strings will
-108             // be converted to Date objects.
-109 
-110             myData = JSON.parse(text, function (key, value) {
-111                 var a;
-112                 if (typeof value === 'string') {
-113                     a =
-114 /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
-115                     if (a) {
-116                         return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
-117                             +a[5], +a[6]));
-118                     }
-119                 }
-120                 return value;
-121             });
-122 
-123             myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
-124                 var d;
-125                 if (typeof value === 'string' &&
-126                         value.slice(0, 5) === 'Date(' &&
-127                         value.slice(-1) === ')') {
-128                     d = new Date(value.slice(5, -1));
-129                     if (d) {
-130                         return d;
-131                     }
-132                 }
-133                 return value;
-134             });
-135 
-136 
-137     This is a reference implementation. You are free to copy, modify, or
-138     redistribute.
-139 
-140     This code should be minified before deployment.
-141     See http://javascript.crockford.com/jsmin.html
-142 
-143     USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
-144     NOT CONTROL.
-145 */
-146 
-147 /*jslint evil: true */
-148 
-149 /*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
-150     call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
-151     getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
-152     lastIndex, length, parse, prototype, push, replace, slice, stringify,
-153     test, toJSON, toString, valueOf
-154 */
-155 
-156 "use strict";
-157 
-158 // Create a JSON object only if one does not already exist. We create the
-159 // methods in a closure to avoid creating global variables.
-160 
-161 if (!this.JSON) {
-162     this.JSON = {};
-163 }
-164 
-165 (function () {
-166 
-167     function f(n) {
-168         // Format integers to have at least two digits.
-169         return n < 10 ? '0' + n : n;
-170     }
-171 
-172     if (typeof Date.prototype.toJSON !== 'function') {
-173 
-174         Date.prototype.toJSON = function (key) {
-175 
-176             return isFinite(this.valueOf()) ?
-177                    this.getUTCFullYear()   + '-' +
-178                  f(this.getUTCMonth() + 1) + '-' +
-179                  f(this.getUTCDate())      + 'T' +
-180                  f(this.getUTCHours())     + ':' +
-181                  f(this.getUTCMinutes())   + ':' +
-182                  f(this.getUTCSeconds())   + 'Z' : null;
-183         };
-184 
-185         String.prototype.toJSON =
-186         Number.prototype.toJSON =
-187         Boolean.prototype.toJSON = function (key) {
-188             return this.valueOf();
-189         };
-190     }
-191 
-192     var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
-193         escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
-194         gap,
-195         indent,
-196         meta = {    // table of character substitutions
-197             '\b': '\\b',
-198             '\t': '\\t',
-199             '\n': '\\n',
-200             '\f': '\\f',
-201             '\r': '\\r',
-202             '"' : '\\"',
-203             '\\': '\\\\'
-204         },
-205         rep;
-206 
-207 
-208     function quote(string) {
-209 
-210 // If the string contains no control characters, no quote characters, and no
-211 // backslash characters, then we can safely slap some quotes around it.
-212 // Otherwise we must also replace the offending characters with safe escape
-213 // sequences.
-214 
-215         escapable.lastIndex = 0;
-216         return escapable.test(string) ?
-217             '"' + string.replace(escapable, function (a) {
-218                 var c = meta[a];
-219                 return typeof c === 'string' ? c :
-220                     '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
-221             }) + '"' :
-222             '"' + string + '"';
-223     }
-224 
-225 
-226     function str(key, holder) {
-227 // Produce a string from holder[key].
-228 
-229         var i,          // The loop counter.
-230             k,          // The member key.
-231             v,          // The member value.
-232             length,
-233             mind = gap,
-234             partial,
-235             value = holder[key];
-236 
-237 // If the value has a toJSON method, call it to obtain a replacement value.
-238 
-239         if (value && typeof value === 'object' &&
-240                 typeof value.toJSON === 'function') {
-241             value = value.toJSON(key);
-242         }
-243 
-244 // If we were called with a replacer function, then call the replacer to
-245 // obtain a replacement value.
-246 
-247         if (typeof rep === 'function') {
-248             value = rep.call(holder, key, value);
-249         }
-250 
-251 // What happens next depends on the value's type.
-252 
-253         switch (typeof value) {
-254         case 'string':
-255             return quote(value);
-256 
-257         case 'number':
-258 
-259 // JSON numbers must be finite. Encode non-finite numbers as null.
-260 
-261             return isFinite(value) ? String(value) : 'null';
-262 
-263         case 'boolean':
-264         case 'null':
-265 
-266 // If the value is a boolean or null, convert it to a string. Note:
-267 // typeof null does not produce 'null'. The case is included here in
-268 // the remote chance that this gets fixed someday.
-269 
-270             return String(value);
-271 
-272 // If the type is 'object', we might be dealing with an object or an array or
-273 // null.
-274 
-275         case 'object':
-276 
-277 // Due to a specification blunder in ECMAScript, typeof null is 'object',
-278 // so watch out for that case.
-279 
-280             if (!value) {
-281                 return 'null';
-282             }
-283 
-284 // Make an array to hold the partial results of stringifying this object value.
-285 
-286             gap += indent;
-287             partial = [];
-288 
-289 // Is the value an array?
-290 
-291             if (Object.prototype.toString.apply(value) === '[object Array]') {
-292 
-293 // The value is an array. Stringify every element. Use null as a placeholder
-294 // for non-JSON values.
-295 
-296                 length = value.length;
-297                 for (i = 0; i < length; i += 1) {
-298                     partial[i] = str(i, value) || 'null';
-299                 }
-300 
-301 // Join all of the elements together, separated with commas, and wrap them in
-302 // brackets.
-303 
-304                 v = partial.length === 0 ? '[]' :
-305                     gap ? '[\n' + gap +
-306                             partial.join(',\n' + gap) + '\n' +
-307                                 mind + ']' :
-308                           '[' + partial.join(',') + ']';
-309                 gap = mind;
-310                 return v;
-311             }
-312 
-313 // If the replacer is an array, use it to select the members to be stringified.
-314 
-315             if (rep && typeof rep === 'object') {
-316                 length = rep.length;
-317                 for (i = 0; i < length; i += 1) {
-318                     k = rep[i];
-319                     if (typeof k === 'string') {
-320                         v = str(k, value);
-321                         if (v) {
-322                             partial.push(quote(k) + (gap ? ': ' : ':') + v);
-323                         }
-324                     }
-325                 }
-326             } else {
-327 
-328 // Otherwise, iterate through all of the keys in the object.
-329 
-330                 for (k in value) {
-331                     if (Object.hasOwnProperty.call(value, k)) {
-332                         v = str(k, value);
-333                         if (v) {
-334                             partial.push(quote(k) + (gap ? ': ' : ':') + v);
-335                         }
-336                     }
-337                 }
-338             }
-339 
-340 // Join all of the member texts together, separated with commas,
-341 // and wrap them in braces.
-342 
-343             v = partial.length === 0 ? '{}' :
-344                 gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
-345                         mind + '}' : '{' + partial.join(',') + '}';
-346             gap = mind;
-347             return v;
-348         }
-349     }
-350 
-351 // If the JSON object does not yet have a stringify method, give it one.
-352 
-353     if (typeof JSON.stringify !== 'function') {
-354         JSON.stringify = function (value, replacer, space) {
-355 // The stringify method takes a value and an optional replacer, and an optional
-356 // space parameter, and returns a JSON text. The replacer can be a function
-357 // that can replace values, or an array of strings that will select the keys.
-358 // A default replacer method can be provided. Use of the space parameter can
-359 // produce text that is more easily readable.
-360 
-361             var i;
-362             gap = '';
-363             indent = '';
-364 
-365 // If the space parameter is a number, make an indent string containing that
-366 // many spaces.
-367 
-368             if (typeof space === 'number') {
-369                 for (i = 0; i < space; i += 1) {
-370                     indent += ' ';
-371                 }
-372 
-373 // If the space parameter is a string, it will be used as the indent string.
-374 
-375             } else if (typeof space === 'string') {
-376                 indent = space;
-377             }
-378 
-379 // If there is a replacer, it must be a function or an array.
-380 // Otherwise, throw an error.
-381 
-382             rep = replacer;
-383             if (replacer && typeof replacer !== 'function' &&
-384                     (typeof replacer !== 'object' ||
-385                      typeof replacer.length !== 'number')) {
-386                 throw new Error('JSON.stringify');
-387             }
-388 
-389 // Make a fake root object containing our value under the key of ''.
-390 // Return the result of stringifying the value.
-391 
-392             return str('', {'': value});
-393         };
-394     }
-395 
-396 
-397 // If the JSON object does not yet have a parse method, give it one.
-398 
-399     if (typeof JSON.parse !== 'function') {
-400         JSON.parse = function (text, reviver) {
-401 
-402 // The parse method takes a text and an optional reviver function, and returns
-403 // a JavaScript value if the text is a valid JSON text.
-404 
-405             var j;
-406 
-407             function walk(holder, key) {
-408 
-409 // The walk method is used to recursively walk the resulting structure so
-410 // that modifications can be made.
-411 
-412                 var k, v, value = holder[key];
-413                 if (value && typeof value === 'object') {
-414                     for (k in value) {
-415                         if (Object.hasOwnProperty.call(value, k)) {
-416                             v = walk(value, k);
-417                             if (v !== undefined) {
-418                                 value[k] = v;
-419                             } else {
-420                                 delete value[k];
-421                             }
-422                         }
-423                     }
-424                 }
-425                 return reviver.call(holder, key, value);
-426             }
-427 
-428 
-429 // Parsing happens in four stages. In the first stage, we replace certain
-430 // Unicode characters with escape sequences. JavaScript handles many characters
-431 // incorrectly, either silently deleting them, or treating them as line endings.
-432 
-433             cx.lastIndex = 0;
-434             if (cx.test(text)) {
-435                 text = text.replace(cx, function (a) {
-436                     return '\\u' +
-437                         ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
-438                 });
-439             }
-440 
-441 // In the second stage, we run the text against regular expressions that look
-442 // for non-JSON patterns. We are especially concerned with '()' and 'new'
-443 // because they can cause invocation, and '=' because it can cause mutation.
-444 // But just to be safe, we want to reject all unexpected forms.
-445 
-446 // We split the second stage into 4 regexp operations in order to work around
-447 // crippling inefficiencies in IE's and Safari's regexp engines. First we
-448 // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
-449 // replace all simple value tokens with ']' characters. Third, we delete all
-450 // open brackets that follow a colon or comma or that begin the text. Finally,
-451 // we look to see that the remaining characters are only whitespace or ']' or
-452 // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
-453 
-454             if (/^[\],:{}\s]*$/.
-455 test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
-456 replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
-457 replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
-458 
-459 // In the third stage we use the eval function to compile the text into a
-460 // JavaScript structure. The '{' operator is subject to a syntactic ambiguity
-461 // in JavaScript: it can begin a block or an object literal. We wrap the text
-462 // in parens to eliminate the ambiguity.
-463 
-464                 j = eval('(' + text + ')');
-465 
-466 // In the optional fourth stage, we recursively walk the new structure, passing
-467 // each name/value pair to a reviver function for possible transformation.
-468 
-469                 return typeof reviver === 'function' ?
-470                     walk({'': j}, '') : j;
-471             }
-472 
-473 // If the text is not JSON parseable, then a SyntaxError is thrown.
-474 
-475             throw new SyntaxError('JSON.parse');
-476         };
-477     }
-478 }());
-479 
\ No newline at end of file diff --git a/doc/symbols/src/src_Block.js.html b/doc/symbols/src/src_Block.js.html new file mode 100644 index 0000000..a834f58 --- /dev/null +++ b/doc/symbols/src/src_Block.js.html @@ -0,0 +1,29 @@ +
  1 /**
+  2  * Blocks are functions with executable code that make up a spec.
+  3  *
+  4  * @constructor
+  5  * @param {jasmine.Env} env
+  6  * @param {Function} func
+  7  * @param {jasmine.Spec} spec
+  8  */
+  9 jasmine.Block = function(env, func, spec) {
+ 10   this.env = env;
+ 11   this.func = func;
+ 12   this.spec = spec;
+ 13 };
+ 14 
+ 15 jasmine.Block.prototype.execute = function(onComplete) {  
+ 16   try {
+ 17     this.func.apply(this.spec);
+ 18   } catch (e) {
+ 19     this.spec.fail(e);
+ 20   }
+ 21   onComplete();
+ 22 };
\ No newline at end of file diff --git a/doc/symbols/src/src_Env.js.html b/doc/symbols/src/src_Env.js.html new file mode 100644 index 0000000..e004986 --- /dev/null +++ b/doc/symbols/src/src_Env.js.html @@ -0,0 +1,232 @@ +
  1 /**
+  2  * Environment for Jasmine
+  3  *
+  4  * @constructor
+  5  */
+  6 jasmine.Env = function() {
+  7   this.currentSpec = null;
+  8   this.currentSuite = null;
+  9   this.currentRunner_ = new jasmine.Runner(this);
+ 10 
+ 11   this.reporter = new jasmine.MultiReporter();
+ 12 
+ 13   this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL
+ 14   this.lastUpdate = 0;
+ 15   this.specFilter = function() {
+ 16     return true;
+ 17   };
+ 18 
+ 19   this.nextSpecId_ = 0;
+ 20   this.nextSuiteId_ = 0;
+ 21   this.equalityTesters_ = [];
+ 22 };
+ 23 
+ 24 
+ 25 jasmine.Env.prototype.setTimeout = jasmine.setTimeout;
+ 26 jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout;
+ 27 jasmine.Env.prototype.setInterval = jasmine.setInterval;
+ 28 jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
+ 29 
+ 30 /**
+ 31  * @returns an object containing jasmine version build info, if set.
+ 32  */
+ 33 jasmine.Env.prototype.version = function () {
+ 34   if (jasmine.version_) {
+ 35     return jasmine.version_;
+ 36   } else {
+ 37     throw new Error('Version not set');
+ 38   }
+ 39 };
+ 40 
+ 41 /**
+ 42  * @returns a sequential integer starting at 0
+ 43  */
+ 44 jasmine.Env.prototype.nextSpecId = function () {
+ 45   return this.nextSpecId_++;
+ 46 };
+ 47 
+ 48 /**
+ 49  * @returns a sequential integer starting at 0
+ 50  */
+ 51 jasmine.Env.prototype.nextSuiteId = function () {
+ 52   return this.nextSuiteId_++;
+ 53 };
+ 54 
+ 55 /**
+ 56  * Register a reporter to receive status updates from Jasmine.
+ 57  * @param {jasmine.Reporter} reporter An object which will receive status updates.
+ 58  */
+ 59 jasmine.Env.prototype.addReporter = function(reporter) {
+ 60   this.reporter.addReporter(reporter);
+ 61 };
+ 62 
+ 63 jasmine.Env.prototype.execute = function() {
+ 64   this.currentRunner_.execute();
+ 65 };
+ 66 
+ 67 jasmine.Env.prototype.describe = function(description, specDefinitions) {
+ 68   var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite);
+ 69 
+ 70   var parentSuite = this.currentSuite;
+ 71   if (parentSuite) {
+ 72     parentSuite.add(suite);
+ 73   } else {
+ 74     this.currentRunner_.add(suite);
+ 75   }
+ 76 
+ 77   this.currentSuite = suite;
+ 78 
+ 79   specDefinitions.call(suite);
+ 80 
+ 81   this.currentSuite = parentSuite;
+ 82 
+ 83   return suite;
+ 84 };
+ 85 
+ 86 jasmine.Env.prototype.beforeEach = function(beforeEachFunction) {
+ 87   if (this.currentSuite) {
+ 88     this.currentSuite.beforeEach(beforeEachFunction);
+ 89   } else {
+ 90     this.currentRunner_.beforeEach(beforeEachFunction);
+ 91   }
+ 92 };
+ 93 
+ 94 jasmine.Env.prototype.currentRunner = function () {
+ 95   return this.currentRunner_;
+ 96 };
+ 97 
+ 98 jasmine.Env.prototype.afterEach = function(afterEachFunction) {
+ 99   if (this.currentSuite) {
+100     this.currentSuite.afterEach(afterEachFunction);
+101   } else {
+102     this.currentRunner_.afterEach(afterEachFunction);
+103   }
+104 
+105 };
+106 
+107 jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) {
+108   return {
+109     execute: function() {
+110     }
+111   };
+112 };
+113 
+114 jasmine.Env.prototype.it = function(description, func) {
+115   var spec = new jasmine.Spec(this, this.currentSuite, description);
+116   this.currentSuite.add(spec);
+117   this.currentSpec = spec;
+118 
+119   if (func) {
+120     spec.runs(func);
+121   }
+122 
+123   return spec;
+124 };
+125 
+126 jasmine.Env.prototype.xit = function(desc, func) {
+127   return {
+128     id: this.nextSpecId(),
+129     runs: function() {
+130     }
+131   };
+132 };
+133 
+134 jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
+135   if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
+136     return true;
+137   }
+138 
+139   a.__Jasmine_been_here_before__ = b;
+140   b.__Jasmine_been_here_before__ = a;
+141 
+142   var hasKey = function(obj, keyName) {
+143     return obj != null && obj[keyName] !== undefined;
+144   };
+145 
+146   for (var property in b) {
+147     if (!hasKey(a, property) && hasKey(b, property)) {
+148       mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
+149     }
+150   }
+151   for (property in a) {
+152     if (!hasKey(b, property) && hasKey(a, property)) {
+153       mismatchKeys.push("expected missing key '" + property + "', but present in actual.");
+154     }
+155   }
+156   for (property in b) {
+157     if (property == '__Jasmine_been_here_before__') continue;
+158     if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) {
+159       mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual.");
+160     }
+161   }
+162 
+163   if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) {
+164     mismatchValues.push("arrays were not the same length");
+165   }
+166 
+167   delete a.__Jasmine_been_here_before__;
+168   delete b.__Jasmine_been_here_before__;
+169   return (mismatchKeys.length == 0 && mismatchValues.length == 0);
+170 };
+171 
+172 jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
+173   mismatchKeys = mismatchKeys || [];
+174   mismatchValues = mismatchValues || [];
+175 
+176   if (a === b) return true;
+177 
+178   if (a === undefined || a === null || b === undefined || b === null) {
+179     return (a == undefined && b == undefined);
+180   }
+181 
+182   if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) {
+183     return a === b;
+184   }
+185 
+186   if (a instanceof Date && b instanceof Date) {
+187     return a.getTime() == b.getTime();
+188   }
+189 
+190   if (a instanceof jasmine.Matchers.Any) {
+191     return a.matches(b);
+192   }
+193 
+194   if (b instanceof jasmine.Matchers.Any) {
+195     return b.matches(a);
+196   }
+197 
+198   if (typeof a === "object" && typeof b === "object") {
+199     return this.compareObjects_(a, b, mismatchKeys, mismatchValues);
+200   }
+201 
+202   for (var i = 0; i < this.equalityTesters_.length; i++) {
+203     var equalityTester = this.equalityTesters_[i];
+204     var result = equalityTester(a, b, this, mismatchKeys, mismatchValues);
+205     if (result !== undefined) return result;
+206   }
+207 
+208   //Straight check
+209   return (a === b);
+210 };
+211 
+212 jasmine.Env.prototype.contains_ = function(haystack, needle) {
+213   if (jasmine.isArray_(haystack)) {
+214     for (var i = 0; i < haystack.length; i++) {
+215       if (this.equals_(haystack[i], needle)) return true;
+216     }
+217     return false;
+218   }
+219   return haystack.indexOf(needle) >= 0;
+220 };
+221 
+222 jasmine.Env.prototype.addEqualityTester = function(equalityTester) {
+223   this.equalityTesters_.push(equalityTester);
+224 };
+225 
\ No newline at end of file diff --git a/doc/symbols/src/src_JsApiReporter.js.html b/doc/symbols/src/src_JsApiReporter.js.html new file mode 100644 index 0000000..fa4bd53 --- /dev/null +++ b/doc/symbols/src/src_JsApiReporter.js.html @@ -0,0 +1,110 @@ +
  1 /** JavaScript API reporter.
+  2  *
+  3  * @constructor
+  4  */
+  5 jasmine.JsApiReporter = function() {
+  6   this.started = false;
+  7   this.finished = false;
+  8   this.suites_ = [];
+  9   this.results_ = {};
+ 10 };
+ 11 
+ 12 jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) {
+ 13   this.started = true;
+ 14   var suites = runner.suites();
+ 15   for (var i = 0; i < suites.length; i++) {
+ 16     var suite = suites[i];
+ 17     this.suites_.push(this.summarize_(suite));
+ 18   }
+ 19 };
+ 20 
+ 21 jasmine.JsApiReporter.prototype.suites = function() {
+ 22   return this.suites_;
+ 23 };
+ 24 
+ 25 jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) {
+ 26   var isSuite = suiteOrSpec instanceof jasmine.Suite;
+ 27   var summary = {
+ 28     id: suiteOrSpec.id,
+ 29     name: suiteOrSpec.description,
+ 30     type: isSuite ? 'suite' : 'spec',
+ 31     children: []
+ 32   };
+ 33   if (isSuite) {
+ 34     var specs = suiteOrSpec.specs();
+ 35     for (var i = 0; i < specs.length; i++) {
+ 36       summary.children.push(this.summarize_(specs[i]));
+ 37     }
+ 38   }
+ 39   return summary;
+ 40 };
+ 41 
+ 42 jasmine.JsApiReporter.prototype.results = function() {
+ 43   return this.results_;
+ 44 };
+ 45 
+ 46 jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) {
+ 47   return this.results_[specId];
+ 48 };
+ 49 
+ 50 //noinspection JSUnusedLocalSymbols
+ 51 jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) {
+ 52   this.finished = true;
+ 53 };
+ 54 
+ 55 //noinspection JSUnusedLocalSymbols
+ 56 jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) {
+ 57 };
+ 58 
+ 59 //noinspection JSUnusedLocalSymbols
+ 60 jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) {
+ 61   this.results_[spec.id] = {
+ 62     messages: spec.results().getItems(),
+ 63     result: spec.results().failedCount > 0 ? "failed" : "passed"
+ 64   };
+ 65 };
+ 66 
+ 67 //noinspection JSUnusedLocalSymbols
+ 68 jasmine.JsApiReporter.prototype.log = function(str) {
+ 69 };
+ 70 
+ 71 jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){
+ 72   var results = {};
+ 73   for (var i = 0; i < specIds.length; i++) {
+ 74     var specId = specIds[i];
+ 75     results[specId] = this.summarizeResult_(this.results_[specId]);
+ 76   }
+ 77   return results;
+ 78 };
+ 79 
+ 80 jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
+ 81   var summaryMessages = [];
+ 82   for (var messageIndex in result.messages) {
+ 83     var resultMessage = result.messages[messageIndex];
+ 84     summaryMessages.push({
+ 85       text: resultMessage.text,
+ 86       passed: resultMessage.passed ? resultMessage.passed() : true,
+ 87       type: resultMessage.type,
+ 88       message: resultMessage.message,
+ 89       trace: {
+ 90         stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : undefined
+ 91       }
+ 92     });
+ 93   };
+ 94 
+ 95   var summaryResult = {
+ 96     result : result.result,
+ 97     messages : summaryMessages
+ 98   };
+ 99 
+100   return summaryResult;
+101 };
+102 
+103 
\ No newline at end of file diff --git a/doc/symbols/src/src_Matchers.js.html b/doc/symbols/src/src_Matchers.js.html new file mode 100644 index 0000000..17275cf --- /dev/null +++ b/doc/symbols/src/src_Matchers.js.html @@ -0,0 +1,399 @@ +
  1 /**
+  2  * @constructor
+  3  * @param {jasmine.Env} env
+  4  * @param actual
+  5  * @param {jasmine.Spec} spec
+  6  */
+  7 jasmine.Matchers = function(env, actual, spec) {
+  8   this.env = env;
+  9   this.actual = actual;
+ 10   this.spec = spec;
+ 11 };
+ 12 
+ 13 jasmine.Matchers.pp = function(str) {
+ 14   return jasmine.util.htmlEscape(jasmine.pp(str));
+ 15 };
+ 16 
+ 17 jasmine.Matchers.prototype.report = function(result, failing_message, details) {
+ 18   var expectationResult = new jasmine.ExpectationResult({
+ 19     passed: result,
+ 20     message: failing_message,
+ 21     details: details
+ 22   });
+ 23   this.spec.addMatcherResult(expectationResult);
+ 24   return result;
+ 25 };
+ 26 
+ 27 jasmine.Matchers.matcherFn_ = function(matcherName, options) {
+ 28   return function () {
+ 29     jasmine.util.extend(this, options);
+ 30     var matcherArgs = jasmine.util.argsToArray(arguments);
+ 31     var args = [this.actual].concat(matcherArgs);
+ 32     var result = options.test.apply(this, args);
+ 33     var message;
+ 34     if (!result) {
+ 35       message = options.message.apply(this, args);
+ 36     }
+ 37     var expectationResult = new jasmine.ExpectationResult({
+ 38       matcherName: matcherName,
+ 39       passed: result,
+ 40       expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0],
+ 41       actual: this.actual,
+ 42       message: message
+ 43     });
+ 44     this.spec.addMatcherResult(expectationResult);
+ 45     return result;
+ 46   };
+ 47 };
+ 48 
+ 49 
+ 50 
+ 51 
+ 52 /**
+ 53  * toBe: compares the actual to the expected using ===
+ 54  * @param expected
+ 55  */
+ 56 
+ 57 jasmine.Matchers.prototype.toBe = jasmine.Matchers.matcherFn_('toBe', {
+ 58   test: function (actual, expected) {
+ 59     return actual === expected;
+ 60   },
+ 61   message: function(actual, expected) {
+ 62     return "Expected " + jasmine.pp(actual) + " to be " + jasmine.pp(expected);
+ 63   }
+ 64 });
+ 65 
+ 66 /**
+ 67  * toNotBe: compares the actual to the expected using !==
+ 68  * @param expected
+ 69  */
+ 70 jasmine.Matchers.prototype.toNotBe = jasmine.Matchers.matcherFn_('toNotBe', {
+ 71   test: function (actual, expected) {
+ 72     return actual !== expected;
+ 73   },
+ 74   message: function(actual, expected) {
+ 75     return "Expected " + jasmine.pp(actual) + " to not be " + jasmine.pp(expected);
+ 76   }
+ 77 });
+ 78 
+ 79 /**
+ 80  * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.
+ 81  *
+ 82  * @param expected
+ 83  */
+ 84 
+ 85 jasmine.Matchers.prototype.toEqual = jasmine.Matchers.matcherFn_('toEqual', {
+ 86   test: function (actual, expected) {
+ 87     return this.env.equals_(actual, expected);
+ 88   },
+ 89   message: function(actual, expected) {
+ 90     return "Expected " + jasmine.pp(actual) + " to equal " + jasmine.pp(expected);
+ 91   }
+ 92 });
+ 93 
+ 94 /**
+ 95  * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual
+ 96  * @param expected
+ 97  */
+ 98 jasmine.Matchers.prototype.toNotEqual = jasmine.Matchers.matcherFn_('toNotEqual', {
+ 99   test: function (actual, expected) {
+100     return !this.env.equals_(actual, expected);
+101   },
+102   message: function(actual, expected) {
+103     return "Expected " + jasmine.pp(actual) + " to not equal " + jasmine.pp(expected);
+104   }
+105 });
+106 
+107 /**
+108  * Matcher that compares the actual to the expected using a regular expression.  Constructs a RegExp, so takes
+109  * a pattern or a String.
+110  *
+111  * @param reg_exp
+112  */
+113 jasmine.Matchers.prototype.toMatch = jasmine.Matchers.matcherFn_('toMatch', {
+114   test: function(actual, expected) {
+115     return new RegExp(expected).test(actual);
+116   },
+117   message: function(actual, expected) {
+118     return jasmine.pp(actual) + " does not match the regular expression " + new RegExp(expected).toString();
+119   }
+120 });
+121 
+122 /**
+123  * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
+124  * @param reg_exp
+125  */
+126 
+127 jasmine.Matchers.prototype.toNotMatch = jasmine.Matchers.matcherFn_('toNotMatch', {
+128   test: function(actual, expected) {
+129     return !(new RegExp(expected).test(actual));
+130   },
+131   message: function(actual, expected) {
+132     return jasmine.pp(actual) + " should not match " + new RegExp(expected).toString();
+133   }
+134 });
+135 
+136 /**
+137  * Matcher that compares the acutal to undefined.
+138  */
+139 
+140 jasmine.Matchers.prototype.toBeDefined = jasmine.Matchers.matcherFn_('toBeDefined', {
+141   test: function(actual) {
+142     return (actual !== undefined);
+143   },
+144   message: function() {
+145     return 'Expected actual to not be undefined.';
+146   }
+147 });
+148 
+149 /**
+150  * Matcher that compares the acutal to undefined.
+151  */
+152 
+153 jasmine.Matchers.prototype.toBeUndefined = jasmine.Matchers.matcherFn_('toBeUndefined', {
+154   test: function(actual) {
+155     return (actual === undefined);
+156   },
+157   message: function(actual) {
+158     return 'Expected ' + jasmine.pp(actual) + ' to be undefined.';
+159   }
+160 });
+161 
+162 /**
+163  * Matcher that compares the actual to null.
+164  *
+165  */
+166 jasmine.Matchers.prototype.toBeNull = jasmine.Matchers.matcherFn_('toBeNull', {
+167   test: function(actual) {
+168     return (actual === null);
+169   },
+170   message: function(actual) {
+171     return 'Expected ' + jasmine.pp(actual) + ' to be null.';
+172   }
+173 });
+174 
+175 /**
+176  * Matcher that boolean not-nots the actual.
+177  */
+178 jasmine.Matchers.prototype.toBeTruthy = jasmine.Matchers.matcherFn_('toBeTruthy', {
+179   test: function(actual) {
+180     return !!actual;
+181   },
+182   message: function() {
+183     return 'Expected actual to be truthy';
+184   }
+185 });
+186 
+187 
+188 /**
+189  * Matcher that boolean nots the actual.
+190  */
+191 jasmine.Matchers.prototype.toBeFalsy = jasmine.Matchers.matcherFn_('toBeFalsy', {
+192   test: function(actual) {
+193     return !actual;
+194   },
+195   message: function(actual) {
+196     return 'Expected ' + jasmine.pp(actual) + ' to be falsy';
+197   }
+198 });
+199 
+200 /**
+201  * Matcher that checks to see if the acutal, a Jasmine spy, was called.
+202  */
+203 
+204 jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.matcherFn_('wasCalled', {
+205   getActual_: function() {
+206     var args = jasmine.util.argsToArray(arguments);
+207     if (args.length > 1) {
+208       throw(new Error('wasCalled does not take arguments, use wasCalledWith'));
+209     }
+210     return args.splice(0, 1)[0];
+211   },
+212   test: function() {
+213     var actual = this.getActual_.apply(this, arguments);
+214     if (!actual || !actual.isSpy) {
+215       return false;
+216     }
+217     return actual.wasCalled;
+218   },
+219   message: function() {
+220     var actual = this.getActual_.apply(this, arguments);
+221     if (!actual || !actual.isSpy) {
+222       return 'Actual is not a spy.';
+223     }
+224     return "Expected spy " + actual.identity + " to have been called.";
+225   }
+226 });
+227 
+228 /**
+229  * Matcher that checks to see if the acutal, a Jasmine spy, was not called.
+230  */
+231 jasmine.Matchers.prototype.wasNotCalled = jasmine.Matchers.matcherFn_('wasNotCalled', {
+232   getActual_: function() {
+233     var args = jasmine.util.argsToArray(arguments);
+234     return args.splice(0, 1)[0];
+235   },
+236   test: function() {
+237     var actual = this.getActual_.apply(this, arguments);
+238     if (!actual || !actual.isSpy) {
+239       return false;
+240     }
+241     return !actual.wasCalled;
+242   },
+243   message: function() {
+244     var actual = this.getActual_.apply(this, arguments);
+245     if (!actual || !actual.isSpy) {
+246       return 'Actual is not a spy.';
+247     }
+248     return "Expected spy " + actual.identity + " to not have been called.";
+249   }
+250 });
+251 
+252 jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.matcherFn_('wasCalledWith', {
+253   test: function() {
+254     var args = jasmine.util.argsToArray(arguments);
+255     var actual = args.splice(0, 1)[0];
+256     if (!actual || !actual.isSpy) {
+257       return false;
+258     }
+259     return this.env.contains_(actual.argsForCall, args);
+260   },
+261   message: function() {
+262     var args = jasmine.util.argsToArray(arguments);
+263     var actual = args.splice(0, 1)[0];
+264     var message;
+265     if (!actual || !actual.isSpy) {
+266       message = 'Actual is not a spy';
+267     } else {
+268       message = "Expected spy to have been called with " + jasmine.pp(args) + " but was called with " + actual.argsForCall;
+269     }
+270     return message;
+271   }
+272 });
+273 
+274 /**
+275  * Matcher that checks to see if the acutal, a Jasmine spy, was called with a set of parameters.
+276  *
+277  * @example
+278  *
+279  */
+280 
+281 /**
+282  * Matcher that checks that the expected item is an element in the actual Array.
+283  *
+284  * @param {Object} item
+285  */
+286 
+287 jasmine.Matchers.prototype.toContain = jasmine.Matchers.matcherFn_('toContain', {
+288   test: function(actual, expected) {
+289     return this.env.contains_(actual, expected);
+290   },
+291   message: function(actual, expected) {
+292     return 'Expected ' + jasmine.pp(actual) + ' to contain ' + jasmine.pp(expected);
+293   }
+294 });
+295 
+296 /**
+297  * Matcher that checks that the expected item is NOT an element in the actual Array.
+298  *
+299  * @param {Object} item
+300  */
+301 jasmine.Matchers.prototype.toNotContain = jasmine.Matchers.matcherFn_('toNotContain', {
+302   test: function(actual, expected) {
+303     return !this.env.contains_(actual, expected);
+304   },
+305   message: function(actual, expected) {
+306     return 'Expected ' + jasmine.pp(actual) + ' to not contain ' + jasmine.pp(expected);
+307   }
+308 });
+309 
+310 jasmine.Matchers.prototype.toBeLessThan = jasmine.Matchers.matcherFn_('toBeLessThan', {
+311   test: function(actual, expected) {
+312     return actual < expected;
+313   },
+314   message: function(actual, expected) {
+315     return 'Expected ' + jasmine.pp(actual) + ' to be less than ' + jasmine.pp(expected);
+316   }
+317 });
+318 
+319 jasmine.Matchers.prototype.toBeGreaterThan = jasmine.Matchers.matcherFn_('toBeGreaterThan', {
+320   test: function(actual, expected) {
+321     return actual > expected;
+322   },
+323   message: function(actual, expected) {
+324     return 'Expected ' + jasmine.pp(actual) + ' to be greater than ' + jasmine.pp(expected);
+325   }
+326 });
+327 
+328 /**
+329  * Matcher that checks that the expected exception was thrown by the actual.
+330  *
+331  * @param {String} expectedException
+332  */
+333 jasmine.Matchers.prototype.toThrow = jasmine.Matchers.matcherFn_('toThrow', {
+334   getException_: function(actual, expected) {
+335     var exception;
+336     if (typeof actual != 'function') {
+337       throw new Error('Actual is not a function');
+338     }
+339     try {
+340       actual();
+341     } catch (e) {
+342       exception = e;
+343     }
+344     return exception;
+345   },
+346   test: function(actual, expected) {
+347     var result = false;
+348     var exception = this.getException_(actual, expected);
+349     if (exception) {
+350       result = (expected === undefined || this.env.equals_(exception.message || exception, expected.message || expected));
+351     }
+352     return result;
+353   },
+354   message: function(actual, expected) {
+355     var exception = this.getException_(actual, expected);
+356     if (exception && (expected === undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) {
+357       return ["Expected function to throw", expected.message || expected, ", but it threw", exception.message || exception  ].join(' ');
+358     } else {
+359       return "Expected function to throw an exception.";
+360     }
+361   }
+362 });
+363 
+364 jasmine.Matchers.Any = function(expectedClass) {
+365   this.expectedClass = expectedClass;
+366 };
+367 
+368 jasmine.Matchers.Any.prototype.matches = function(other) {
+369   if (this.expectedClass == String) {
+370     return typeof other == 'string' || other instanceof String;
+371   }
+372 
+373   if (this.expectedClass == Number) {
+374     return typeof other == 'number' || other instanceof Number;
+375   }
+376 
+377   if (this.expectedClass == Function) {
+378     return typeof other == 'function' || other instanceof Function;
+379   }
+380 
+381   if (this.expectedClass == Object) {
+382     return typeof other == 'object';
+383   }
+384 
+385   return other instanceof this.expectedClass;
+386 };
+387 
+388 jasmine.Matchers.Any.prototype.toString = function() {
+389   return '<jasmine.any(' + this.expectedClass + ')>';
+390 };
+391 
+392 
\ No newline at end of file diff --git a/doc/symbols/src/src_MultiReporter.js.html b/doc/symbols/src/src_MultiReporter.js.html new file mode 100644 index 0000000..ddae087 --- /dev/null +++ b/doc/symbols/src/src_MultiReporter.js.html @@ -0,0 +1,36 @@ +
  1 /**
+  2  * @constructor
+  3  */
+  4 jasmine.MultiReporter = function() {
+  5   this.subReporters_ = [];
+  6 };
+  7 jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter);
+  8 
+  9 jasmine.MultiReporter.prototype.addReporter = function(reporter) {
+ 10   this.subReporters_.push(reporter);
+ 11 };
+ 12 
+ 13 (function() {
+ 14   var functionNames = ["reportRunnerStarting", "reportRunnerResults", "reportSuiteResults", "reportSpecResults", "log"];
+ 15   for (var i = 0; i < functionNames.length; i++) {
+ 16     var functionName = functionNames[i];
+ 17     jasmine.MultiReporter.prototype[functionName] = (function(functionName) {
+ 18       return function() {
+ 19         for (var j = 0; j < this.subReporters_.length; j++) {
+ 20           var subReporter = this.subReporters_[j];
+ 21           if (subReporter[functionName]) {
+ 22             subReporter[functionName].apply(subReporter, arguments);
+ 23           }
+ 24         }
+ 25       };
+ 26     })(functionName);
+ 27   }
+ 28 })();
+ 29 
\ No newline at end of file diff --git a/doc/symbols/src/src_NestedResults.js.html b/doc/symbols/src/src_NestedResults.js.html new file mode 100644 index 0000000..8f8c392 --- /dev/null +++ b/doc/symbols/src/src_NestedResults.js.html @@ -0,0 +1,88 @@ +
  1 /**
+  2  * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults
+  3  *
+  4  * @constructor
+  5  */
+  6 jasmine.NestedResults = function() {
+  7   /**
+  8    * The total count of results
+  9    */
+ 10   this.totalCount = 0;
+ 11   /**
+ 12    * Number of passed results
+ 13    */
+ 14   this.passedCount = 0;
+ 15   /**
+ 16    * Number of failed results
+ 17    */
+ 18   this.failedCount = 0;
+ 19   /**
+ 20    * Was this suite/spec skipped?
+ 21    */
+ 22   this.skipped = false;
+ 23   /**
+ 24    * @ignore
+ 25    */
+ 26   this.items_ = [];
+ 27 };
+ 28 
+ 29 /**
+ 30  * Roll up the result counts.
+ 31  *
+ 32  * @param result
+ 33  */
+ 34 jasmine.NestedResults.prototype.rollupCounts = function(result) {
+ 35   this.totalCount += result.totalCount;
+ 36   this.passedCount += result.passedCount;
+ 37   this.failedCount += result.failedCount;
+ 38 };
+ 39 
+ 40 /**
+ 41  * Tracks a result's message.
+ 42  * @param message
+ 43  */
+ 44 jasmine.NestedResults.prototype.log = function(message) {
+ 45   this.items_.push(new jasmine.MessageResult(message));
+ 46 };
+ 47 
+ 48 /**
+ 49  * Getter for the results: message & results.
+ 50  */
+ 51 jasmine.NestedResults.prototype.getItems = function() {
+ 52   return this.items_;
+ 53 };
+ 54 
+ 55 /**
+ 56  * Adds a result, tracking counts (total, passed, & failed)
+ 57  * @param {jasmine.ExpectationResult|jasmine.NestedResults} result
+ 58  */
+ 59 jasmine.NestedResults.prototype.addResult = function(result) {
+ 60   if (result.type != 'MessageResult') {
+ 61     if (result.items_) {
+ 62       this.rollupCounts(result);
+ 63     } else {
+ 64       this.totalCount++;
+ 65       if (result.passed()) {
+ 66         this.passedCount++;
+ 67       } else {
+ 68         this.failedCount++;
+ 69       }
+ 70     }
+ 71   }
+ 72   this.items_.push(result);
+ 73 };
+ 74 
+ 75 /**
+ 76  * @returns {Boolean} True if <b>everything</b> below passed
+ 77  */
+ 78 jasmine.NestedResults.prototype.passed = function() {
+ 79   return this.passedCount === this.totalCount;
+ 80 };
+ 81 
\ No newline at end of file diff --git a/doc/symbols/src/src_PrettyPrinter.js.html b/doc/symbols/src/src_PrettyPrinter.js.html new file mode 100644 index 0000000..0508164 --- /dev/null +++ b/doc/symbols/src/src_PrettyPrinter.js.html @@ -0,0 +1,128 @@ +
  1 /**
+  2  * Base class for pretty printing for expectation results.
+  3  */
+  4 jasmine.PrettyPrinter = function() {
+  5   this.ppNestLevel_ = 0;
+  6 };
+  7 
+  8 /**
+  9  * Formats a value in a nice, human-readable string.
+ 10  *
+ 11  * @param value
+ 12  * @returns {String}
+ 13  */
+ 14 jasmine.PrettyPrinter.prototype.format = function(value) {
+ 15   if (this.ppNestLevel_ > 40) {
+ 16     //    return '(jasmine.pp nested too deeply!)';
+ 17     throw new Error('jasmine.PrettyPrinter: format() nested too deeply!');
+ 18   }
+ 19 
+ 20   this.ppNestLevel_++;
+ 21   try {
+ 22     if (value === undefined) {
+ 23       this.emitScalar('undefined');
+ 24     } else if (value === null) {
+ 25       this.emitScalar('null');
+ 26     } else if (value.navigator && value.frames && value.setTimeout) {
+ 27       this.emitScalar('<window>');
+ 28     } else if (value instanceof jasmine.Matchers.Any) {
+ 29       this.emitScalar(value.toString());
+ 30     } else if (typeof value === 'string') {
+ 31       this.emitString(value);
+ 32     } else if (typeof value === 'function') {
+ 33       this.emitScalar('Function');
+ 34     } else if (typeof value.nodeType === 'number') {
+ 35       this.emitScalar('HTMLNode');
+ 36     } else if (value instanceof Date) {
+ 37       this.emitScalar('Date(' + value + ')');
+ 38     } else if (value.__Jasmine_been_here_before__) {
+ 39       this.emitScalar('<circular reference: ' + (jasmine.isArray_(value) ? 'Array' : 'Object') + '>');
+ 40     } else if (jasmine.isArray_(value) || typeof value == 'object') {
+ 41       value.__Jasmine_been_here_before__ = true;
+ 42       if (jasmine.isArray_(value)) {
+ 43         this.emitArray(value);
+ 44       } else {
+ 45         this.emitObject(value);
+ 46       }
+ 47       delete value.__Jasmine_been_here_before__;
+ 48     } else {
+ 49       this.emitScalar(value.toString());
+ 50     }
+ 51   } finally {
+ 52     this.ppNestLevel_--;
+ 53   }
+ 54 };
+ 55 
+ 56 jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
+ 57   for (var property in obj) {
+ 58     if (property == '__Jasmine_been_here_before__') continue;
+ 59     fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) != null) : false);
+ 60   }
+ 61 };
+ 62 
+ 63 jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_;
+ 64 jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_;
+ 65 jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_;
+ 66 jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_;
+ 67 
+ 68 jasmine.StringPrettyPrinter = function() {
+ 69   jasmine.PrettyPrinter.call(this);
+ 70 
+ 71   this.string = '';
+ 72 };
+ 73 jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter);
+ 74 
+ 75 jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) {
+ 76   this.append(value);
+ 77 };
+ 78 
+ 79 jasmine.StringPrettyPrinter.prototype.emitString = function(value) {
+ 80   this.append("'" + value + "'");
+ 81 };
+ 82 
+ 83 jasmine.StringPrettyPrinter.prototype.emitArray = function(array) {
+ 84   this.append('[ ');
+ 85   for (var i = 0; i < array.length; i++) {
+ 86     if (i > 0) {
+ 87       this.append(', ');
+ 88     }
+ 89     this.format(array[i]);
+ 90   }
+ 91   this.append(' ]');
+ 92 };
+ 93 
+ 94 jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) {
+ 95   var self = this;
+ 96   this.append('{ ');
+ 97   var first = true;
+ 98 
+ 99   this.iterateObject(obj, function(property, isGetter) {
+100     if (first) {
+101       first = false;
+102     } else {
+103       self.append(', ');
+104     }
+105 
+106     self.append(property);
+107     self.append(' : ');
+108     if (isGetter) {
+109       self.append('<getter>');
+110     } else {
+111       self.format(obj[property]);
+112     }
+113   });
+114 
+115   this.append(' }');
+116 };
+117 
+118 jasmine.StringPrettyPrinter.prototype.append = function(value) {
+119   this.string += value;
+120 };
+121 
\ No newline at end of file diff --git a/doc/symbols/src/src_Queue.js.html b/doc/symbols/src/src_Queue.js.html new file mode 100644 index 0000000..fc81c10 --- /dev/null +++ b/doc/symbols/src/src_Queue.js.html @@ -0,0 +1,102 @@ +
  1 jasmine.Queue = function(env) {
+  2   this.env = env;
+  3   this.blocks = [];
+  4   this.running = false;
+  5   this.index = 0;
+  6   this.offset = 0;
+  7 };
+  8 
+  9 jasmine.Queue.prototype.addBefore = function(block) {
+ 10   this.blocks.unshift(block);
+ 11 };
+ 12 
+ 13 jasmine.Queue.prototype.add = function(block) {
+ 14   this.blocks.push(block);
+ 15 };
+ 16 
+ 17 jasmine.Queue.prototype.insertNext = function(block) {
+ 18   this.blocks.splice((this.index + this.offset + 1), 0, block);
+ 19   this.offset++;
+ 20 };
+ 21 
+ 22 jasmine.Queue.prototype.start = function(onComplete) {
+ 23   this.running = true;
+ 24   this.onComplete = onComplete;
+ 25   this.next_();
+ 26 };
+ 27 
+ 28 jasmine.Queue.prototype.isRunning = function() {
+ 29   return this.running;
+ 30 };
+ 31 
+ 32 jasmine.Queue.LOOP_DONT_RECURSE = true;
+ 33 
+ 34 jasmine.Queue.prototype.next_ = function() {
+ 35   var self = this;
+ 36   var goAgain = true;
+ 37 
+ 38   while (goAgain) {
+ 39     goAgain = false;
+ 40     
+ 41     if (self.index < self.blocks.length) {
+ 42       var calledSynchronously = true;
+ 43       var completedSynchronously = false;
+ 44 
+ 45       var onComplete = function () {
+ 46         if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {
+ 47           completedSynchronously = true;
+ 48           return;
+ 49         }
+ 50 
+ 51         self.offset = 0;
+ 52         self.index++;
+ 53 
+ 54         var now = new Date().getTime();
+ 55         if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {
+ 56           self.env.lastUpdate = now;
+ 57           self.env.setTimeout(function() {
+ 58             self.next_();
+ 59           }, 0);
+ 60         } else {
+ 61           if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {
+ 62             goAgain = true;
+ 63           } else {
+ 64             self.next_();
+ 65           }
+ 66         }
+ 67       };
+ 68       self.blocks[self.index].execute(onComplete);
+ 69 
+ 70       calledSynchronously = false;
+ 71       if (completedSynchronously) {
+ 72         onComplete();
+ 73       }
+ 74       
+ 75     } else {
+ 76       self.running = false;
+ 77       if (self.onComplete) {
+ 78         self.onComplete();
+ 79       }
+ 80     }
+ 81   }
+ 82 };
+ 83 
+ 84 jasmine.Queue.prototype.results = function() {
+ 85   var results = new jasmine.NestedResults();
+ 86   for (var i = 0; i < this.blocks.length; i++) {
+ 87     if (this.blocks[i].results) {
+ 88       results.addResult(this.blocks[i].results());
+ 89     }
+ 90   }
+ 91   return results;
+ 92 };
+ 93 
+ 94 
+ 95 
\ No newline at end of file diff --git a/doc/symbols/src/src_Reporter.js.html b/doc/symbols/src/src_Reporter.js.html new file mode 100644 index 0000000..590a568 --- /dev/null +++ b/doc/symbols/src/src_Reporter.js.html @@ -0,0 +1,35 @@ +
  1 /** No-op base class for Jasmine reporters.
+  2  *
+  3  * @constructor
+  4  */
+  5 jasmine.Reporter = function() {
+  6 };
+  7 
+  8 //noinspection JSUnusedLocalSymbols
+  9 jasmine.Reporter.prototype.reportRunnerStarting = function(runner) {
+ 10 };
+ 11 
+ 12 //noinspection JSUnusedLocalSymbols
+ 13 jasmine.Reporter.prototype.reportRunnerResults = function(runner) {
+ 14 };
+ 15 
+ 16 //noinspection JSUnusedLocalSymbols
+ 17 jasmine.Reporter.prototype.reportSuiteResults = function(suite) {
+ 18 };
+ 19 
+ 20 //noinspection JSUnusedLocalSymbols
+ 21 jasmine.Reporter.prototype.reportSpecResults = function(spec) {
+ 22 };
+ 23 
+ 24 //noinspection JSUnusedLocalSymbols
+ 25 jasmine.Reporter.prototype.log = function(str) {
+ 26 };
+ 27 
+ 28 
\ No newline at end of file diff --git a/doc/symbols/src/src_Reporters.js.html b/doc/symbols/src/src_Reporters.js.html new file mode 100644 index 0000000..996a8e2 --- /dev/null +++ b/doc/symbols/src/src_Reporters.js.html @@ -0,0 +1,41 @@ +
  1 /* JasmineReporters.reporter
+  2  *    Base object that will get called whenever a Spec, Suite, or Runner is done.  It is up to
+  3  *    descendants of this object to do something with the results (see json_reporter.js)
+  4  */
+  5 jasmine.Reporters = {};
+  6 
+  7 jasmine.Reporters.reporter = function(callbacks) {
+  8   var that = {
+  9     callbacks: callbacks || {},
+ 10 
+ 11     doCallback: function(callback, results) {
+ 12       if (callback) {
+ 13         callback(results);
+ 14       }
+ 15     },
+ 16 
+ 17     reportRunnerResults: function(runner) {
+ 18       that.doCallback(that.callbacks.runnerCallback, runner);
+ 19     },
+ 20     reportSuiteResults:  function(suite) {
+ 21       that.doCallback(that.callbacks.suiteCallback, suite);
+ 22     },
+ 23     reportSpecResults:   function(spec) {
+ 24       that.doCallback(that.callbacks.specCallback, spec);
+ 25     },
+ 26     log: function (str) {
+ 27       if (console && console.log) console.log(str);
+ 28     }
+ 29   };
+ 30 
+ 31   return that;
+ 32 };
+ 33 
+ 34 
\ No newline at end of file diff --git a/doc/symbols/src/src_Runner.js.html b/doc/symbols/src/src_Runner.js.html new file mode 100644 index 0000000..7875142 --- /dev/null +++ b/doc/symbols/src/src_Runner.js.html @@ -0,0 +1,75 @@ +
  1 /**
+  2  * Runner
+  3  *
+  4  * @constructor
+  5  * @param {jasmine.Env} env
+  6  */
+  7 jasmine.Runner = function(env) {
+  8   var self = this;
+  9   self.env = env;
+ 10   self.queue = new jasmine.Queue(env);
+ 11   self.before_ = [];
+ 12   self.after_ = [];
+ 13   self.suites_ = [];
+ 14 };
+ 15 
+ 16 jasmine.Runner.prototype.execute = function() {
+ 17   var self = this;
+ 18   if (self.env.reporter.reportRunnerStarting) {
+ 19     self.env.reporter.reportRunnerStarting(this);
+ 20   }
+ 21   self.queue.start(function () {
+ 22     self.finishCallback();
+ 23   });
+ 24 };
+ 25 
+ 26 jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) {
+ 27   beforeEachFunction.typeName = 'beforeEach';
+ 28   this.before_.push(beforeEachFunction);
+ 29 };
+ 30 
+ 31 jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
+ 32   afterEachFunction.typeName = 'afterEach';
+ 33   this.after_.push(afterEachFunction);
+ 34 };
+ 35 
+ 36 
+ 37 jasmine.Runner.prototype.finishCallback = function() {
+ 38   this.env.reporter.reportRunnerResults(this);
+ 39 };
+ 40 
+ 41 jasmine.Runner.prototype.addSuite = function(suite) {
+ 42   this.suites_.push(suite);
+ 43 };
+ 44 
+ 45 jasmine.Runner.prototype.add = function(block) {
+ 46   if (block instanceof jasmine.Suite) {
+ 47     this.addSuite(block);
+ 48   }
+ 49   this.queue.add(block);
+ 50 };
+ 51 
+ 52 jasmine.Runner.prototype.specs = function () {
+ 53   var suites = this.suites();
+ 54   var specs = [];
+ 55   for (var i = 0; i < suites.length; i++) {
+ 56     specs = specs.concat(suites[i].specs());
+ 57   }
+ 58   return specs;
+ 59 };
+ 60 
+ 61 
+ 62 jasmine.Runner.prototype.suites = function() {
+ 63   return this.suites_;
+ 64 };
+ 65 
+ 66 jasmine.Runner.prototype.results = function() {
+ 67   return this.queue.results();
+ 68 };
\ No newline at end of file diff --git a/doc/symbols/src/src_Spec.js.html b/doc/symbols/src/src_Spec.js.html new file mode 100644 index 0000000..b550cf3 --- /dev/null +++ b/doc/symbols/src/src_Spec.js.html @@ -0,0 +1,215 @@ +
  1 /**
+  2  * Internal representation of a Jasmine specification, or test.
+  3  *
+  4  * @constructor
+  5  * @param {jasmine.Env} env
+  6  * @param {jasmine.Suite} suite
+  7  * @param {String} description
+  8  */
+  9 jasmine.Spec = function(env, suite, description) {
+ 10   if (!env) {
+ 11     throw new Error('jasmine.Env() required');
+ 12   }
+ 13   ;
+ 14   if (!suite) {
+ 15     throw new Error('jasmine.Suite() required');
+ 16   }
+ 17   ;
+ 18   var spec = this;
+ 19   spec.id = env.nextSpecId ? env.nextSpecId() : null;
+ 20   spec.env = env;
+ 21   spec.suite = suite;
+ 22   spec.description = description;
+ 23   spec.queue = new jasmine.Queue(env);
+ 24 
+ 25   spec.afterCallbacks = [];
+ 26   spec.spies_ = [];
+ 27 
+ 28   spec.results_ = new jasmine.NestedResults();
+ 29   spec.results_.description = description;
+ 30   spec.matchersClass = null;
+ 31 };
+ 32 
+ 33 jasmine.Spec.prototype.getFullName = function() {
+ 34   return this.suite.getFullName() + ' ' + this.description + '.';
+ 35 };
+ 36 
+ 37 
+ 38 jasmine.Spec.prototype.results = function() {
+ 39   return this.results_;
+ 40 };
+ 41 
+ 42 jasmine.Spec.prototype.log = function(message) {
+ 43   return this.results_.log(message);
+ 44 };
+ 45 
+ 46 /** @deprecated */
+ 47 jasmine.Spec.prototype.getResults = function() {
+ 48   return this.results_;
+ 49 };
+ 50 
+ 51 jasmine.Spec.prototype.runs = function (func) {
+ 52   var block = new jasmine.Block(this.env, func, this);
+ 53   this.addToQueue(block);
+ 54   return this;
+ 55 };
+ 56 
+ 57 jasmine.Spec.prototype.addToQueue = function (block) {
+ 58   if (this.queue.isRunning()) {
+ 59     this.queue.insertNext(block);
+ 60   } else {
+ 61     this.queue.add(block);
+ 62   }
+ 63 };
+ 64 
+ 65 jasmine.Spec.prototype.addMatcherResult = function(result) {
+ 66   this.results_.addResult(result);
+ 67 };
+ 68 
+ 69 jasmine.Spec.prototype.expect = function(actual) {
+ 70   return new (this.getMatchersClass_())(this.env, actual, this);
+ 71 };
+ 72 
+ 73 jasmine.Spec.prototype.waits = function(timeout) {
+ 74   var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this);
+ 75   this.addToQueue(waitsFunc);
+ 76   return this;
+ 77 };
+ 78 
+ 79 jasmine.Spec.prototype.waitsFor = function(timeout, latchFunction, timeoutMessage) {
+ 80   var waitsForFunc = new jasmine.WaitsForBlock(this.env, timeout, latchFunction, timeoutMessage, this);
+ 81   this.addToQueue(waitsForFunc);
+ 82   return this;
+ 83 };
+ 84 
+ 85 jasmine.Spec.prototype.fail = function (e) {
+ 86   var expectationResult = new jasmine.ExpectationResult({
+ 87     passed: false,
+ 88     message: e ? jasmine.util.formatException(e) : 'Exception'
+ 89   });
+ 90   this.results_.addResult(expectationResult);
+ 91 };
+ 92 
+ 93 jasmine.Spec.prototype.getMatchersClass_ = function() {
+ 94   return this.matchersClass || jasmine.Matchers;
+ 95 };
+ 96 
+ 97 jasmine.Spec.prototype.addMatchers = function(matchersPrototype) {
+ 98   var parent = this.getMatchersClass_();
+ 99   var newMatchersClass = function() {
+100     parent.apply(this, arguments);
+101   };
+102   jasmine.util.inherit(newMatchersClass, parent);
+103   for (var method in matchersPrototype) {
+104     newMatchersClass.prototype[method] = matchersPrototype[method];
+105   }
+106   this.matchersClass = newMatchersClass;
+107 };
+108 
+109 jasmine.Spec.prototype.finishCallback = function() {
+110   this.env.reporter.reportSpecResults(this);
+111 };
+112 
+113 jasmine.Spec.prototype.finish = function(onComplete) {
+114   this.removeAllSpies();
+115   this.finishCallback();
+116   if (onComplete) {
+117     onComplete();
+118   }
+119 };
+120 
+121 jasmine.Spec.prototype.after = function(doAfter, test) {
+122 
+123   if (this.queue.isRunning()) {
+124     this.queue.add(new jasmine.Block(this.env, doAfter, this));
+125   } else {
+126     this.afterCallbacks.unshift(doAfter);
+127   }
+128 };
+129 
+130 jasmine.Spec.prototype.execute = function(onComplete) {
+131   var spec = this;
+132   if (!spec.env.specFilter(spec)) {
+133     spec.results_.skipped = true;
+134     spec.finish(onComplete);
+135     return;
+136   }
+137   this.env.reporter.log('>> Jasmine Running ' + this.suite.description + ' ' + this.description + '...');
+138 
+139   spec.env.currentSpec = spec;
+140 
+141   spec.addBeforesAndAftersToQueue();
+142 
+143   spec.queue.start(function () {
+144     spec.finish(onComplete);
+145   });
+146 };
+147 
+148 jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() {
+149   var runner = this.env.currentRunner();
+150   for (var suite = this.suite; suite; suite = suite.parentSuite) {
+151     for (var i = 0; i < suite.before_.length; i++) {
+152       this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this));
+153     }
+154   }
+155   for (var i = 0; i < runner.before_.length; i++) {
+156     this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this));
+157   }
+158   for (i = 0; i < this.afterCallbacks.length; i++) {
+159     this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this));
+160   }
+161   for (suite = this.suite; suite; suite = suite.parentSuite) {
+162     for (var i = 0; i < suite.after_.length; i++) {
+163       this.queue.add(new jasmine.Block(this.env, suite.after_[i], this));
+164     }
+165   }
+166   for (var i = 0; i < runner.after_.length; i++) {
+167     this.queue.add(new jasmine.Block(this.env, runner.after_[i], this));
+168   }
+169 };
+170 
+171 jasmine.Spec.prototype.explodes = function() {
+172   throw 'explodes function should not have been called';
+173 };
+174 
+175 jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) {
+176   if (obj == undefined) {
+177     throw "spyOn could not find an object to spy upon for " + methodName + "()";
+178   }
+179 
+180   if (!ignoreMethodDoesntExist && obj[methodName] === undefined) {
+181     throw methodName + '() method does not exist';
+182   }
+183 
+184   if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) {
+185     throw new Error(methodName + ' has already been spied upon');
+186   }
+187 
+188   var spyObj = jasmine.createSpy(methodName);
+189 
+190   this.spies_.push(spyObj);
+191   spyObj.baseObj = obj;
+192   spyObj.methodName = methodName;
+193   spyObj.originalValue = obj[methodName];
+194 
+195   obj[methodName] = spyObj;
+196 
+197   return spyObj;
+198 };
+199 
+200 jasmine.Spec.prototype.removeAllSpies = function() {
+201   for (var i = 0; i < this.spies_.length; i++) {
+202     var spy = this.spies_[i];
+203     spy.baseObj[spy.methodName] = spy.originalValue;
+204   }
+205   this.spies_ = [];
+206 };
+207 
+208 
\ No newline at end of file diff --git a/doc/symbols/src/src_Suite.js.html b/doc/symbols/src/src_Suite.js.html new file mode 100644 index 0000000..db39a6c --- /dev/null +++ b/doc/symbols/src/src_Suite.js.html @@ -0,0 +1,77 @@ +
  1 /**
+  2  * Internal representation of a Jasmine suite.
+  3  *
+  4  * @constructor
+  5  * @param {jasmine.Env} env
+  6  * @param {String} description
+  7  * @param {Function} specDefinitions
+  8  * @param {jasmine.Suite} parentSuite
+  9  */
+ 10 jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
+ 11   var self = this;
+ 12   self.id = env.nextSuiteId ? env.nextSuiteId() : null;
+ 13   self.description = description;
+ 14   self.queue = new jasmine.Queue(env);
+ 15   self.parentSuite = parentSuite;
+ 16   self.env = env;
+ 17   self.before_ = [];
+ 18   self.after_ = [];
+ 19   self.specs_ = [];
+ 20 };
+ 21 
+ 22 jasmine.Suite.prototype.getFullName = function() {
+ 23   var fullName = this.description;
+ 24   for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
+ 25     fullName = parentSuite.description + ' ' + fullName;
+ 26   }
+ 27   return fullName;
+ 28 };
+ 29 
+ 30 jasmine.Suite.prototype.finish = function(onComplete) {
+ 31   this.env.reporter.reportSuiteResults(this);
+ 32   this.finished = true;
+ 33   if (typeof(onComplete) == 'function') {
+ 34     onComplete();
+ 35   }
+ 36 };
+ 37 
+ 38 jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
+ 39   beforeEachFunction.typeName = 'beforeEach';
+ 40   this.before_.push(beforeEachFunction);
+ 41 };
+ 42 
+ 43 jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
+ 44   afterEachFunction.typeName = 'afterEach';
+ 45   this.after_.push(afterEachFunction);
+ 46 };
+ 47 
+ 48 jasmine.Suite.prototype.results = function() {
+ 49   return this.queue.results();
+ 50 };
+ 51 
+ 52 jasmine.Suite.prototype.add = function(block) {
+ 53   if (block instanceof jasmine.Suite) {
+ 54     this.env.currentRunner().addSuite(block);
+ 55   } else {
+ 56     this.specs_.push(block);
+ 57   }
+ 58   this.queue.add(block);
+ 59 };
+ 60 
+ 61 jasmine.Suite.prototype.specs = function() {
+ 62   return this.specs_;
+ 63 };
+ 64 
+ 65 jasmine.Suite.prototype.execute = function(onComplete) {
+ 66   var self = this;
+ 67   this.queue.start(function () {
+ 68     self.finish(onComplete);
+ 69   });
+ 70 };
\ No newline at end of file diff --git a/doc/symbols/src/src_WaitsBlock.js.html b/doc/symbols/src/src_WaitsBlock.js.html new file mode 100644 index 0000000..4a1f119 --- /dev/null +++ b/doc/symbols/src/src_WaitsBlock.js.html @@ -0,0 +1,21 @@ +
  1 jasmine.WaitsBlock = function(env, timeout, spec) {
+  2   this.timeout = timeout;
+  3   jasmine.Block.call(this, env, null, spec);
+  4 };
+  5 
+  6 jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block);
+  7 
+  8 jasmine.WaitsBlock.prototype.execute = function (onComplete) {
+  9   this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...');
+ 10   this.env.setTimeout(function () {
+ 11     onComplete();
+ 12   }, this.timeout);
+ 13 };
+ 14 
\ No newline at end of file diff --git a/doc/symbols/src/src_WaitsForBlock.js.html b/doc/symbols/src/src_WaitsForBlock.js.html new file mode 100644 index 0000000..60ce1ad --- /dev/null +++ b/doc/symbols/src/src_WaitsForBlock.js.html @@ -0,0 +1,45 @@ +
  1 jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
+  2   this.timeout = timeout;
+  3   this.latchFunction = latchFunction;
+  4   this.message = message;
+  5   this.totalTimeSpentWaitingForLatch = 0;
+  6   jasmine.Block.call(this, env, null, spec);
+  7 };
+  8 
+  9 jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block);
+ 10 
+ 11 jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 100;
+ 12 
+ 13 jasmine.WaitsForBlock.prototype.execute = function (onComplete) {
+ 14   var self = this;
+ 15   self.env.reporter.log('>> Jasmine waiting for ' + (self.message || 'something to happen'));
+ 16   var latchFunctionResult;
+ 17   try {
+ 18     latchFunctionResult = self.latchFunction.apply(self.spec);
+ 19   } catch (e) {
+ 20     self.spec.fail(e);
+ 21     onComplete();
+ 22     return;
+ 23   }
+ 24 
+ 25   if (latchFunctionResult) {
+ 26     onComplete();
+ 27   } else if (self.totalTimeSpentWaitingForLatch >= self.timeout) {
+ 28     var message = 'timed out after ' + self.timeout + ' msec waiting for ' + (self.message || 'something to happen');
+ 29     self.spec.fail({
+ 30       name: 'timeout',
+ 31       message: message
+ 32     });
+ 33     self.spec._next();
+ 34   } else {
+ 35     self.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;
+ 36     self.env.setTimeout(function () { self.execute(onComplete); }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);
+ 37   }
+ 38 };
\ No newline at end of file diff --git a/doc/symbols/src/src_base.js.html b/doc/symbols/src/src_base.js.html new file mode 100644 index 0000000..38cfeb7 --- /dev/null +++ b/doc/symbols/src/src_base.js.html @@ -0,0 +1,539 @@ +
  1 /**
+  2  * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
+  3  *
+  4  * @namespace
+  5  */
+  6 var jasmine = {};
+  7 
+  8 /**
+  9  * @private
+ 10  */
+ 11 jasmine.unimplementedMethod_ = function() {
+ 12   throw new Error("unimplemented method");
+ 13 };
+ 14 
+ 15 /**
+ 16  * Default interval for event loop yields. Small values here may result in slow test running. Zero means no updates until all tests have completed.
+ 17  *
+ 18  */
+ 19 jasmine.DEFAULT_UPDATE_INTERVAL = 250;
+ 20 
+ 21 /**
+ 22  * Allows for bound functions to be comapred.  Internal use only.
+ 23  *
+ 24  * @ignore
+ 25  * @private
+ 26  * @param base {Object} bound 'this' for the function
+ 27  * @param name {Function} function to find
+ 28  */
+ 29 jasmine.bindOriginal_ = function(base, name) {
+ 30   var original = base[name];
+ 31   if (original.apply) {
+ 32     return function() {
+ 33       return original.apply(base, arguments);
+ 34     };
+ 35   } else {
+ 36     // IE support
+ 37     return window[name];
+ 38   }
+ 39 };
+ 40 
+ 41 jasmine.setTimeout = jasmine.bindOriginal_(window, 'setTimeout');
+ 42 jasmine.clearTimeout = jasmine.bindOriginal_(window, 'clearTimeout');
+ 43 jasmine.setInterval = jasmine.bindOriginal_(window, 'setInterval');
+ 44 jasmine.clearInterval = jasmine.bindOriginal_(window, 'clearInterval');
+ 45 
+ 46 jasmine.MessageResult = function(text) {
+ 47   this.type = 'MessageResult';
+ 48   this.text = text;
+ 49   this.trace = new Error(); // todo: test better
+ 50 };
+ 51 
+ 52 jasmine.ExpectationResult = function(params) {
+ 53   this.type = 'ExpectationResult';
+ 54   this.matcherName = params.matcherName;
+ 55   this.passed_ = params.passed;
+ 56   this.expected = params.expected;
+ 57   this.actual = params.actual;
+ 58 
+ 59   /** @deprecated */
+ 60   this.details = params.details;
+ 61   
+ 62   this.message = this.passed_ ? 'Passed.' : params.message;
+ 63   this.trace = this.passed_ ? '' : new Error(this.message);
+ 64 };
+ 65 
+ 66 jasmine.ExpectationResult.prototype.passed = function () {
+ 67   return this.passed_;
+ 68 };
+ 69 
+ 70 /**
+ 71  * Getter for the Jasmine environment. Ensures one gets created
+ 72  */
+ 73 jasmine.getEnv = function() {
+ 74   return jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env();
+ 75 };
+ 76 
+ 77 /**
+ 78  * @ignore
+ 79  * @private
+ 80  * @param value
+ 81  * @returns {Boolean}
+ 82  */
+ 83 jasmine.isArray_ = function(value) {
+ 84   return value &&
+ 85          typeof value === 'object' &&
+ 86          typeof value.length === 'number' &&
+ 87          typeof value.splice === 'function' &&
+ 88          !(value.propertyIsEnumerable('length'));
+ 89 };
+ 90 
+ 91 /**
+ 92  * Pretty printer for expecations.  Takes any object and turns it into a human-readable string.
+ 93  *
+ 94  * @param value {Object} an object to be outputted
+ 95  * @returns {String}
+ 96  */
+ 97 jasmine.pp = function(value) {
+ 98   var stringPrettyPrinter = new jasmine.StringPrettyPrinter();
+ 99   stringPrettyPrinter.format(value);
+100   return stringPrettyPrinter.string;
+101 };
+102 
+103 /**
+104  * Returns true if the object is a DOM Node.
+105  *
+106  * @param {Object} obj object to check
+107  * @returns {Boolean}
+108  */
+109 jasmine.isDomNode = function(obj) {
+110   return obj['nodeType'] > 0;
+111 };
+112 
+113 /**
+114  * Returns a matchable 'generic' object of the class type.  For use in expecations of type when values don't matter.
+115  *
+116  * @example
+117  * // don't care about which function is passed in, as long as it's a function
+118  * expect(mySpy).wasCalledWith(jasmine.any(Function));
+119  *
+120  * @param {Class} clazz
+121  * @returns matchable object of the type clazz
+122  */
+123 jasmine.any = function(clazz) {
+124   return new jasmine.Matchers.Any(clazz);
+125 };
+126 
+127 /**
+128  * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
+129  *
+130  * Spies should be created in test setup, before expectations.  They can then be checked, using the standard Jasmine
+131  * expectation syntax. Spies can be checked if they were called or not and what the calling params were.
+132  *
+133  * A Spy has the following mehtod: wasCalled, callCount, mostRecentCall, and argsForCall (see docs)
+134  * Spies are torn down at the end of every spec.
+135  *
+136  * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
+137  *
+138  * @example
+139  * // a stub
+140  * var myStub = jasmine.createSpy('myStub');  // can be used anywhere
+141  *
+142  * // spy example
+143  * var foo = {
+144  *   not: function(bool) { return !bool; }
+145  * }
+146  *
+147  * // actual foo.not will not be called, execution stops
+148  * spyOn(foo, 'not');
+149 
+150  // foo.not spied upon, execution will continue to implementation
+151  * spyOn(foo, 'not').andCallThrough();
+152  *
+153  * // fake example
+154  * var foo = {
+155  *   not: function(bool) { return !bool; }
+156  * }
+157  *
+158  * // foo.not(val) will return val
+159  * spyOn(foo, 'not').andCallFake(function(value) {return value;});
+160  *
+161  * // mock example
+162  * foo.not(7 == 7);
+163  * expect(foo.not).wasCalled();
+164  * expect(foo.not).wasCalledWith(true);
+165  *
+166  * @constructor
+167  * @see spyOn, jasmine.createSpy, jasmine.createSpyObj
+168  * @param {String} name
+169  */
+170 jasmine.Spy = function(name) {
+171   /**
+172    * The name of the spy, if provided.
+173    */
+174   this.identity = name || 'unknown';
+175   /**
+176    *  Is this Object a spy?
+177    */
+178   this.isSpy = true;
+179   /**
+180    * The acutal function this spy stubs.
+181    */
+182   this.plan = function() {
+183   };
+184   /**
+185    * Tracking of the most recent call to the spy.
+186    * @example
+187    * var mySpy = jasmine.createSpy('foo');
+188    * mySpy(1, 2);
+189    * mySpy.mostRecentCall.args = [1, 2];
+190    */
+191   this.mostRecentCall = {};
+192 
+193   /**
+194    * Holds arguments for each call to the spy, indexed by call count
+195    * @example
+196    * var mySpy = jasmine.createSpy('foo');
+197    * mySpy(1, 2);
+198    * mySpy(7, 8);
+199    * mySpy.mostRecentCall.args = [7, 8];
+200    * mySpy.argsForCall[0] = [1, 2];
+201    * mySpy.argsForCall[1] = [7, 8];
+202    */
+203   this.argsForCall = [];
+204   this.calls = [];
+205 };
+206 
+207 /**
+208  * Tells a spy to call through to the actual implemenatation.
+209  *
+210  * @example
+211  * var foo = {
+212  *   bar: function() { // do some stuff }
+213  * }
+214  *
+215  * // defining a spy on an existing property: foo.bar
+216  * spyOn(foo, 'bar').andCallThrough();
+217  */
+218 jasmine.Spy.prototype.andCallThrough = function() {
+219   this.plan = this.originalValue;
+220   return this;
+221 };
+222 
+223 /**
+224  * For setting the return value of a spy.
+225  *
+226  * @example
+227  * // defining a spy from scratch: foo() returns 'baz'
+228  * var foo = jasmine.createSpy('spy on foo').andReturn('baz');
+229  *
+230  * // defining a spy on an existing property: foo.bar() returns 'baz'
+231  * spyOn(foo, 'bar').andReturn('baz');
+232  *
+233  * @param {Object} value
+234  */
+235 jasmine.Spy.prototype.andReturn = function(value) {
+236   this.plan = function() {
+237     return value;
+238   };
+239   return this;
+240 };
+241 
+242 /**
+243  * For throwing an exception when a spy is called.
+244  *
+245  * @example
+246  * // defining a spy from scratch: foo() throws an exception w/ message 'ouch'
+247  * var foo = jasmine.createSpy('spy on foo').andThrow('baz');
+248  *
+249  * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
+250  * spyOn(foo, 'bar').andThrow('baz');
+251  *
+252  * @param {String} exceptionMsg
+253  */
+254 jasmine.Spy.prototype.andThrow = function(exceptionMsg) {
+255   this.plan = function() {
+256     throw exceptionMsg;
+257   };
+258   return this;
+259 };
+260 
+261 /**
+262  * Calls an alternate implementation when a spy is called.
+263  *
+264  * @example
+265  * var baz = function() {
+266  *   // do some stuff, return something
+267  * }
+268  * // defining a spy from scratch: foo() calls the function baz
+269  * var foo = jasmine.createSpy('spy on foo').andCall(baz);
+270  *
+271  * // defining a spy on an existing property: foo.bar() calls an anonymnous function
+272  * spyOn(foo, 'bar').andCall(function() { return 'baz';} );
+273  *
+274  * @param {Function} fakeFunc
+275  */
+276 jasmine.Spy.prototype.andCallFake = function(fakeFunc) {
+277   this.plan = fakeFunc;
+278   return this;
+279 };
+280 
+281 /**
+282  * Resets all of a spy's the tracking variables so that it can be used again.
+283  *
+284  * @example
+285  * spyOn(foo, 'bar');
+286  *
+287  * foo.bar();
+288  *
+289  * expect(foo.bar.callCount).toEqual(1);
+290  *
+291  * foo.bar.reset();
+292  *
+293  * expect(foo.bar.callCount).toEqual(0);
+294  */
+295 jasmine.Spy.prototype.reset = function() {
+296   this.wasCalled = false;
+297   this.callCount = 0;
+298   this.argsForCall = [];
+299   this.calls = [];
+300   this.mostRecentCall = {};
+301 };
+302 
+303 jasmine.createSpy = function(name) {
+304 
+305   var spyObj = function() {
+306     spyObj.wasCalled = true;
+307     spyObj.callCount++;
+308     var args = jasmine.util.argsToArray(arguments);
+309     spyObj.mostRecentCall.object = this;
+310     spyObj.mostRecentCall.args = args;
+311     spyObj.argsForCall.push(args);
+312     spyObj.calls.push({object: this, args: args});
+313     return spyObj.plan.apply(this, arguments);
+314   };
+315 
+316   var spy = new jasmine.Spy(name);
+317 
+318   for (var prop in spy) {
+319     spyObj[prop] = spy[prop];
+320   }
+321 
+322   spyObj.reset();
+323 
+324   return spyObj;
+325 };
+326 
+327 /**
+328  * Creates a more complicated spy: an Object that has every property a function that is a spy.  Used for stubbing something
+329  * large in one call.
+330  *
+331  * @param {String} baseName name of spy class
+332  * @param {Array} methodNames array of names of methods to make spies
+333  */
+334 jasmine.createSpyObj = function(baseName, methodNames) {
+335   var obj = {};
+336   for (var i = 0; i < methodNames.length; i++) {
+337     obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]);
+338   }
+339   return obj;
+340 };
+341 
+342 jasmine.log = function(message) {
+343   jasmine.getEnv().currentSpec.log(message);
+344 };
+345 
+346 /**
+347  * Function that installs a spy on an existing object's method name.  Used within a Spec to create a spy.
+348  *
+349  * @example
+350  * // spy example
+351  * var foo = {
+352  *   not: function(bool) { return !bool; }
+353  * }
+354  * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
+355  *
+356  * @see jasmine.createSpy
+357  * @param obj
+358  * @param methodName
+359  * @returns a Jasmine spy that can be chained with all spy methods
+360  */
+361 var spyOn = function(obj, methodName) {
+362   return jasmine.getEnv().currentSpec.spyOn(obj, methodName);
+363 };
+364 
+365 /**
+366  * Creates a Jasmine spec that will be added to the current suite.
+367  *
+368  * // TODO: pending tests
+369  *
+370  * @example
+371  * it('should be true', function() {
+372  *   expect(true).toEqual(true);
+373  * });
+374  *
+375  * @param {String} desc description of this specification
+376  * @param {Function} func defines the preconditions and expectations of the spec
+377  */
+378 var it = function(desc, func) {
+379   return jasmine.getEnv().it(desc, func);
+380 };
+381 
+382 /**
+383  * Creates a <em>disabled</em> Jasmine spec.
+384  *
+385  * A convenience method that allows existing specs to be disabled temporarily during development.
+386  *
+387  * @param {String} desc description of this specification
+388  * @param {Function} func defines the preconditions and expectations of the spec
+389  */
+390 var xit = function(desc, func) {
+391   return jasmine.getEnv().xit(desc, func);
+392 };
+393 
+394 /**
+395  * Starts a chain for a Jasmine expectation.
+396  *
+397  * It is passed an Object that is the actual value and should chain to one of the many
+398  * jasmine.Matchers functions.
+399  *
+400  * @param {Object} actual Actual value to test against and expected value
+401  */
+402 var expect = function(actual) {
+403   return jasmine.getEnv().currentSpec.expect(actual);
+404 };
+405 
+406 /**
+407  * Defines part of a jasmine spec.  Used in cominbination with waits or waitsFor in asynchrnous specs.
+408  *
+409  * @param {Function} func Function that defines part of a jasmine spec.
+410  */
+411 var runs = function(func) {
+412   jasmine.getEnv().currentSpec.runs(func);
+413 };
+414 
+415 /**
+416  * Waits for a timeout before moving to the next runs()-defined block.
+417  * @param {Number} timeout
+418  */
+419 var waits = function(timeout) {
+420   jasmine.getEnv().currentSpec.waits(timeout);
+421 };
+422 
+423 /**
+424  * Waits for the latchFunction to return true before proceeding to the next runs()-defined block.
+425  *
+426  * @param {Number} timeout
+427  * @param {Function} latchFunction
+428  * @param {String} message
+429  */
+430 var waitsFor = function(timeout, latchFunction, message) {
+431   jasmine.getEnv().currentSpec.waitsFor(timeout, latchFunction, message);
+432 };
+433 
+434 /**
+435  * A function that is called before each spec in a suite.
+436  *
+437  * Used for spec setup, including validating assumptions.
+438  *
+439  * @param {Function} beforeEachFunction
+440  */
+441 var beforeEach = function(beforeEachFunction) {
+442   jasmine.getEnv().beforeEach(beforeEachFunction);
+443 };
+444 
+445 /**
+446  * A function that is called after each spec in a suite.
+447  *
+448  * Used for restoring any state that is hijacked during spec execution.
+449  *
+450  * @param {Function} afterEachFunction
+451  */
+452 var afterEach = function(afterEachFunction) {
+453   jasmine.getEnv().afterEach(afterEachFunction);
+454 };
+455 
+456 /**
+457  * Defines a suite of specifications.
+458  *
+459  * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
+460  * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
+461  * of setup in some tests.
+462  *
+463  * @example
+464  * // TODO: a simple suite
+465  *
+466  * // TODO: a simple suite with a nested describe block
+467  *
+468  * @param {String} description A string, usually the class under test.
+469  * @param {Function} specDefinitions function that defines several specs.
+470  */
+471 var describe = function(description, specDefinitions) {
+472   return jasmine.getEnv().describe(description, specDefinitions);
+473 };
+474 
+475 /**
+476  * Disables a suite of specifications.  Used to disable some suites in a file, or files, temporarily during development.
+477  *
+478  * @param {String} description A string, usually the class under test.
+479  * @param {Function} specDefinitions function that defines several specs.
+480  */
+481 var xdescribe = function(description, specDefinitions) {
+482   return jasmine.getEnv().xdescribe(description, specDefinitions);
+483 };
+484 
+485 
+486 jasmine.XmlHttpRequest = XMLHttpRequest;
+487 
+488 // Provide the XMLHttpRequest class for IE 5.x-6.x:
+489 if (typeof XMLHttpRequest == "undefined") jasmine.XmlHttpRequest = function() {
+490   try {
+491     return new ActiveXObject("Msxml2.XMLHTTP.6.0");
+492   } catch(e) {
+493   }
+494   try {
+495     return new ActiveXObject("Msxml2.XMLHTTP.3.0");
+496   } catch(e) {
+497   }
+498   try {
+499     return new ActiveXObject("Msxml2.XMLHTTP");
+500   } catch(e) {
+501   }
+502   try {
+503     return new ActiveXObject("Microsoft.XMLHTTP");
+504   } catch(e) {
+505   }
+506   throw new Error("This browser does not support XMLHttpRequest.");
+507 };
+508 
+509 /**
+510  * Adds suite files to an HTML document so that they are executed, thus adding them to the current
+511  * Jasmine environment.
+512  *
+513  * @param {String} url path to the file to include
+514  * @param {Boolean} opt_global
+515  */
+516 jasmine.include = function(url, opt_global) {
+517   if (opt_global) {
+518     document.write('<script type="text/javascript" src="' + url + '"></' + 'script>');
+519   } else {
+520     var xhr;
+521     try {
+522       xhr = new jasmine.XmlHttpRequest();
+523       xhr.open("GET", url, false);
+524       xhr.send(null);
+525     } catch(e) {
+526       throw new Error("couldn't fetch " + url + ": " + e);
+527     }
+528 
+529     return eval(xhr.responseText);
+530   }
+531 };
+532 
\ No newline at end of file diff --git a/doc/symbols/src/src_mock-timeout.js.html b/doc/symbols/src/src_mock-timeout.js.html new file mode 100644 index 0000000..787dd6b --- /dev/null +++ b/doc/symbols/src/src_mock-timeout.js.html @@ -0,0 +1,183 @@ +
  1 // Mock setTimeout, clearTimeout
+  2 // Contributed by Pivotal Computer Systems, www.pivotalsf.com
+  3 
+  4 jasmine.FakeTimer = function() {
+  5   this.reset();
+  6 
+  7   var self = this;
+  8   self.setTimeout = function(funcToCall, millis) {
+  9     self.timeoutsMade++;
+ 10     self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false);
+ 11     return self.timeoutsMade;
+ 12   };
+ 13 
+ 14   self.setInterval = function(funcToCall, millis) {
+ 15     self.timeoutsMade++;
+ 16     self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true);
+ 17     return self.timeoutsMade;
+ 18   };
+ 19 
+ 20   self.clearTimeout = function(timeoutKey) {
+ 21     self.scheduledFunctions[timeoutKey] = undefined;
+ 22   };
+ 23 
+ 24   self.clearInterval = function(timeoutKey) {
+ 25     self.scheduledFunctions[timeoutKey] = undefined;
+ 26   };
+ 27 
+ 28 };
+ 29 
+ 30 jasmine.FakeTimer.prototype.reset = function() {
+ 31   this.timeoutsMade = 0;
+ 32   this.scheduledFunctions = {};
+ 33   this.nowMillis = 0;
+ 34 };
+ 35 
+ 36 jasmine.FakeTimer.prototype.tick = function(millis) {
+ 37   var oldMillis = this.nowMillis;
+ 38   var newMillis = oldMillis + millis;
+ 39   this.runFunctionsWithinRange(oldMillis, newMillis);
+ 40   this.nowMillis = newMillis;
+ 41 };
+ 42 
+ 43 jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
+ 44   var scheduledFunc;
+ 45   var funcsToRun = [];
+ 46   for (var timeoutKey in this.scheduledFunctions) {
+ 47     scheduledFunc = this.scheduledFunctions[timeoutKey];
+ 48     if (scheduledFunc != undefined &&
+ 49         scheduledFunc.runAtMillis >= oldMillis &&
+ 50         scheduledFunc.runAtMillis <= nowMillis) {
+ 51       funcsToRun.push(scheduledFunc);
+ 52       this.scheduledFunctions[timeoutKey] = undefined;
+ 53     }
+ 54   }
+ 55 
+ 56   if (funcsToRun.length > 0) {
+ 57     funcsToRun.sort(function(a, b) {
+ 58       return a.runAtMillis - b.runAtMillis;
+ 59     });
+ 60     for (var i = 0; i < funcsToRun.length; ++i) {
+ 61       try {
+ 62         var funcToRun = funcsToRun[i];
+ 63         this.nowMillis = funcToRun.runAtMillis;
+ 64         funcToRun.funcToCall();
+ 65         if (funcToRun.recurring) {
+ 66           this.scheduleFunction(funcToRun.timeoutKey,
+ 67             funcToRun.funcToCall,
+ 68             funcToRun.millis,
+ 69             true);
+ 70         }
+ 71       } catch(e) {
+ 72       }
+ 73     }
+ 74     this.runFunctionsWithinRange(oldMillis, nowMillis);
+ 75   }
+ 76 };
+ 77 
+ 78 jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) {
+ 79   this.scheduledFunctions[timeoutKey] = {
+ 80     runAtMillis: this.nowMillis + millis,
+ 81     funcToCall: funcToCall,
+ 82     recurring: recurring,
+ 83     timeoutKey: timeoutKey,
+ 84     millis: millis
+ 85   };
+ 86 };
+ 87 
+ 88 
+ 89 jasmine.Clock = {
+ 90   defaultFakeTimer: new jasmine.FakeTimer(),
+ 91 
+ 92   reset: function() {
+ 93     jasmine.Clock.assertInstalled();
+ 94     jasmine.Clock.defaultFakeTimer.reset();
+ 95   },
+ 96 
+ 97   tick: function(millis) {
+ 98     jasmine.Clock.assertInstalled();
+ 99     jasmine.Clock.defaultFakeTimer.tick(millis);
+100   },
+101 
+102   runFunctionsWithinRange: function(oldMillis, nowMillis) {
+103     jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis);
+104   },
+105 
+106   scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) {
+107     jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring);
+108   },
+109 
+110   useMock: function() {
+111     var spec = jasmine.getEnv().currentSpec;
+112     spec.after(jasmine.Clock.uninstallMock);
+113 
+114     jasmine.Clock.installMock();
+115   },
+116 
+117   installMock: function() {
+118     jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer;
+119   },
+120 
+121   uninstallMock: function() {
+122     jasmine.Clock.assertInstalled();
+123     jasmine.Clock.installed = jasmine.Clock.real;
+124   },
+125 
+126   real: {
+127     setTimeout: window.setTimeout,
+128     clearTimeout: window.clearTimeout,
+129     setInterval: window.setInterval,
+130     clearInterval: window.clearInterval
+131   },
+132 
+133   assertInstalled: function() {
+134     if (jasmine.Clock.installed != jasmine.Clock.defaultFakeTimer) {
+135       throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()");
+136     }
+137   },
+138 
+139   installed: null
+140 };
+141 jasmine.Clock.installed = jasmine.Clock.real;
+142 
+143 //else for IE support
+144 window.setTimeout = function(funcToCall, millis) {
+145   if (jasmine.Clock.installed.setTimeout.apply) {
+146     return jasmine.Clock.installed.setTimeout.apply(this, arguments);
+147   } else {
+148     return jasmine.Clock.installed.setTimeout(funcToCall, millis);
+149   }
+150 };
+151 
+152 window.setInterval = function(funcToCall, millis) {
+153   if (jasmine.Clock.installed.setInterval.apply) {
+154     return jasmine.Clock.installed.setInterval.apply(this, arguments);
+155   } else {
+156     return jasmine.Clock.installed.setInterval(funcToCall, millis);
+157   }
+158 };
+159 
+160 window.clearTimeout = function(timeoutKey) {
+161   if (jasmine.Clock.installed.clearTimeout.apply) {
+162     return jasmine.Clock.installed.clearTimeout.apply(this, arguments);
+163   } else {
+164     return jasmine.Clock.installed.clearTimeout(timeoutKey);
+165   }
+166 };
+167 
+168 window.clearInterval = function(timeoutKey) {
+169   if (jasmine.Clock.installed.clearTimeout.apply) {
+170     return jasmine.Clock.installed.clearInterval.apply(this, arguments);
+171   } else {
+172   return jasmine.Clock.installed.clearInterval(timeoutKey);
+173   }
+174 };
+175 
+176 
\ No newline at end of file diff --git a/doc/symbols/src/src_util.js.html b/doc/symbols/src/src_util.js.html new file mode 100644 index 0000000..0de8457 --- /dev/null +++ b/doc/symbols/src/src_util.js.html @@ -0,0 +1,72 @@ +
  1 /**
+  2  * @namespace
+  3  */
+  4 jasmine.util = {};
+  5 
+  6 /**
+  7  * Declare that a child class inherite it's prototype from the parent class.
+  8  *
+  9  * @private
+ 10  * @param {Function} childClass
+ 11  * @param {Function} parentClass
+ 12  */
+ 13 jasmine.util.inherit = function(childClass, parentClass) {
+ 14   var subclass = function() {
+ 15   };
+ 16   subclass.prototype = parentClass.prototype;
+ 17   childClass.prototype = new subclass;
+ 18 };
+ 19 
+ 20 jasmine.util.formatException = function(e) {
+ 21   var lineNumber;
+ 22   if (e.line) {
+ 23     lineNumber = e.line;
+ 24   }
+ 25   else if (e.lineNumber) {
+ 26     lineNumber = e.lineNumber;
+ 27   }
+ 28 
+ 29   var file;
+ 30 
+ 31   if (e.sourceURL) {
+ 32     file = e.sourceURL;
+ 33   }
+ 34   else if (e.fileName) {
+ 35     file = e.fileName;
+ 36   }
+ 37 
+ 38   var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();
+ 39 
+ 40   if (file && lineNumber) {
+ 41     message += ' in ' + file + ' (line ' + lineNumber + ')';
+ 42   }
+ 43 
+ 44   return message;
+ 45 };
+ 46 
+ 47 jasmine.util.htmlEscape = function(str) {
+ 48   if (!str) return str;
+ 49   return str.replace(/&/g, '&')
+ 50     .replace(/</g, '<')
+ 51     .replace(/>/g, '>');
+ 52 };
+ 53 
+ 54 jasmine.util.argsToArray = function(args) {
+ 55   var arrayOfArgs = [];
+ 56   for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);
+ 57   return arrayOfArgs;
+ 58 };
+ 59 
+ 60 jasmine.util.extend = function(destination, source) {
+ 61   for (var property in source) destination[property] = source[property];
+ 62   return destination;
+ 63 };
+ 64 
+ 65 
\ No newline at end of file diff --git a/lib/TrivialReporter.js b/lib/TrivialReporter.js index e0e1589..3a49ae6 100644 --- a/lib/TrivialReporter.js +++ b/lib/TrivialReporter.js @@ -90,7 +90,12 @@ jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) { var result = resultItems[i]; if (result.passed && !result.passed()) { var resultMessageDiv = this.createDom('div', {className: 'resultMessage fail'}); - resultMessageDiv.innerHTML = result.message; // todo: lame; mend + + var expectationMessage = "Expected " + jasmine.pp(result.actual) + " " + result.matcherName; + if ("expected" in result) { + expectationMessage += " " + jasmine.pp(result.expected); + } + resultMessageDiv.innerHTML = expectationMessage; // todo: lame; mend specDiv.appendChild(resultMessageDiv); specDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack)); } diff --git a/src/Matchers.js b/src/Matchers.js index cc829e8..889b98d 100644 --- a/src/Matchers.js +++ b/src/Matchers.js @@ -2,7 +2,7 @@ * @constructor * @param {jasmine.Env} env * @param actual - * @param {jasmine.NestedResults} results + * @param {jasmine.Spec} spec */ jasmine.Matchers = function(env, actual, spec) { this.env = env;