+ A function that is called after each spec in a suite.
+
+Used for restoring any state that is hijacked during spec execution.
+
+
+ Defined in: base.js.
+
+
+
+
+
+
+
+
+
Parameters:
+
+
+ {Function}afterEachFunction
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ beforeEach(beforeEachFunction)
+
+
+
+ A function that is called before each spec in a suite.
+
+Used for spec setup, including validating assumptions.
+
+
+ Defined in: base.js.
+
+
+
+ Defines a suite of specifications.
+
+Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
+are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
+of setup in some tests.
+
+
+ Defined in: base.js.
+
+
+
+
+
+
+
// TODO: a simple suite
+
+// TODO: a simple suite with a nested describe block
+
+
+
+
+
+
Parameters:
+
+
+ {String}description
+
+
+
A string, usually the class under test.
+
+
+ {Function}specDefinitions
+
+
+
function that defines several specs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ expect(actual)
+
+
+
+ Starts a chain for a Jasmine expectation.
+
+It is passed an Object that is the actual value and should chain to one of the many
+jasmine.Matchers functions.
+
+
+ Defined in: base.js.
+
+
+
+
+
+
+
+
+
Parameters:
+
+
+ {Object}actual
+
+
+
Actual value to test against and expected value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ it(desc, func)
+
+
+
+ Creates a Jasmine spec that will be added to the current suite.
+
+// TODO: pending tests
+
+
+ Defined in: base.js.
+
+
+
+
+
+
+
it('should be true', function() {
+ expect(true).toEqual(true);
+});
+
+
+
+
+
+
Parameters:
+
+
+ {String}desc
+
+
+
description of this specification
+
+
+ {Function}func
+
+
+
defines the preconditions and expectations of the spec
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ runs(func)
+
+
+
+ Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs.
+
+
+ Defined in: base.js.
+
+
+
+ Waits for the latchFunction to return true before proceeding to the next runs()-defined block.
+
+
+ Defined in: base.js.
+
+
+
+
+
+
+
+
+
Parameters:
+
+
+ {Number}timeout
+
+
+
+
+
+ {Function}latchFunction
+
+
+
+
+
+ {String}message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ xdescribe(description, specDefinitions)
+
+
+
+ Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development.
+
+
+ Defined in: base.js.
+
+
+
+
+
+
+
+
+
Parameters:
+
+
+ {String}description
+
+
+
A string, usually the class under test.
+
+
+ {Function}specDefinitions
+
+
+
function that defines several specs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ xit(desc, func)
+
+
+
+ Creates a disabled Jasmine spec.
+
+A convenience method that allows existing specs to be disabled temporarily during development.
+
+
+ Defined in: base.js.
+
+
+
+
+
+
+
+
+
Parameters:
+
+
+ {String}desc
+
+
+
description of this specification
+
+
+ {Function}func
+
+
+
defines the preconditions and expectations of the spec
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Documentation generated by JsDoc Toolkit 2.3.0 on Sun Jun 28 2009 13:23:39 GMT-0700 (PDT)
+
base for Runner & Suite: allows for a queue of functions to get executed, allowing for
+ any one action to complete, including asynchronous calls, before going to the next
+ action.
+ base for Runner & Suite: allows for a queue of functions to get executed, allowing for
+ any one action to complete, including asynchronous calls, before going to the next
+ action.
+
+
Resets all of a spy's the tracking variables so that it can be used again.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class Detail
+
+
+
+ jasmine.Spy(name)
+
+
+
+ Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
+
+Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine
+expectation syntax. Spies can be checked if they were called or not and what the calling params were.
+
+A Spy has the following mehtod: wasCalled, callCount, mostRecentCall, and argsForCall (see docs)
+Spies are torn down at the end of every spec.
+
+Note: Do not call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
+
+
+
+
+
+
// a stub
+var myStub = jasmine.createSpy('myStub'); // can be used anywhere
+
+// spy example
+var foo = {
+ not: function(bool) { return !bool; }
+}
+
+// actual foo.not will not be called, execution stops
+spyOn(foo, 'not');
+
+ // foo.not spied upon, execution will continue to implementation
+spyOn(foo, 'not').andCallThrough();
+
+// fake example
+var foo = {
+ not: function(bool) { return !bool; }
+}
+
+// foo.not(val) will return val
+spyOn(foo, 'not').andCallFake(function(value) {return value;});
+
+// mock example
+foo.not(7 == 7);
+expect(foo.not).wasCalled();
+expect(foo.not).wasCalledWith(true);
+ Tracking of the most recent call to the spy.
+
+
+
+
+
+
+
var mySpy = jasmine.createSpy('foo');
+mySpy(1, 2);
+mySpy.mostRecentCall.args = [1, 2];
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+
+ andCallFake(fakeFunc)
+
+
+
+ Calls an alternate implementation when a spy is called.
+
+
+
+
+
+
+
var baz = function() {
+ // do some stuff, return something
+}
+// defining a spy from scratch: foo() calls the function baz
+var foo = jasmine.createSpy('spy on foo').andCall(baz);
+
+// defining a spy on an existing property: foo.bar() calls an anonymnous function
+spyOn(foo, 'bar').andCall(function() { return 'baz';} );
+
+
+
+
+
+
Parameters:
+
+
+ {Function}fakeFunc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ andCallThrough()
+
+
+
+ Tells a spy to call through to the actual implemenatation.
+
+
+
+
+
+
+
var foo = {
+ bar: function() { // do some stuff }
+}
+
+// defining a spy on an existing property: foo.bar
+spyOn(foo, 'bar').andCallThrough();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ andReturn(value)
+
+
+
+ For setting the return value of a spy.
+
+
+
+
+
+
+
// defining a spy from scratch: foo() returns 'baz'
+var foo = jasmine.createSpy('spy on foo').andReturn('baz');
+
+// defining a spy on an existing property: foo.bar() returns 'baz'
+spyOn(foo, 'bar').andReturn('baz');
+
+
+
+
+
+
Parameters:
+
+
+ {Object}value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ andThrow(exceptionMsg)
+
+
+
+ For throwing an exception when a spy is called.
+
+
+
+
+
+
+
// defining a spy from scratch: foo() throws an exception w/ message 'ouch'
+var foo = jasmine.createSpy('spy on foo').andThrow('baz');
+
+// defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
+spyOn(foo, 'bar').andThrow('baz');
+
+
+
+
+
+
Parameters:
+
+
+ {String}exceptionMsg
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ plan()
+
+
+
+ The acutal function this spy stubs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ reset()
+
+
+
+ Resets all of a spy's the tracking variables so that it can be used again.
+
+
+
1/**
+ 2 * base for Runner & Suite: allows for a queue of functions to get executed, allowing for
+ 3 * any one action to complete, including asynchronous calls, before going to the next
+ 4 * action.
+ 5 *
+ 6 * @constructor
+ 7 * @param {jasmine.Env} env
+ 8 */
+ 9jasmine.ActionCollection=function(env){
+ 10this.env=env;
+ 11this.actions=[];
+ 12this.index=0;
+ 13this.finished=false;
+ 14};
+ 15
+ 16/**
+ 17 * Marks the collection as done & calls the finish callback, if there is one
+ 18 */
+ 19jasmine.ActionCollection.prototype.finish=function(){
+ 20if(this.finishCallback){
+ 21this.finishCallback();
+ 22}
+ 23this.finished=true;
+ 24};
+ 25
+ 26/**
+ 27 * Starts executing the queue of functions/actions.
+ 28 */
+ 29jasmine.ActionCollection.prototype.execute=function(){
+ 30if(this.actions.length>0){
+ 31this.next();
+ 32}
+ 33};
+ 34
+ 35/**
+ 36 * Gets the current action.
+ 37 */
+ 38jasmine.ActionCollection.prototype.getCurrentAction=function(){
+ 39returnthis.actions[this.index];
+ 40};
+ 41
+ 42/**
+ 43 * Executes the next queued function/action. If there are no more in the queue, calls #finish.
+ 44 */
+ 45jasmine.ActionCollection.prototype.next=function(){
+ 46if(this.index>=this.actions.length){
+ 47this.finish();
+ 48return;
+ 49}
+ 50
+ 51varcurrentAction=this.getCurrentAction();
+ 52
+ 53currentAction.execute(this);
+ 54
+ 55if(currentAction.afterCallbacks){
+ 56for(vari=0;i<currentAction.afterCallbacks.length;i++){
+ 57try{
+ 58currentAction.afterCallbacks[i]();
+ 59}catch(e){
+ 60alert(e);
+ 61}
+ 62}
+ 63}
+ 64
+ 65this.waitForDone(currentAction);
+ 66};
+ 67
+ 68jasmine.ActionCollection.prototype.waitForDone=function(action){
+ 69varself=this;
+ 70varafterExecute=functionafterExecute(){
+ 71self.index++;
+ 72self.next();
+ 73};
+ 74
+ 75if(action.finished){
+ 76varnow=newDate().getTime();
+ 77if(this.env.updateInterval&&now-this.env.lastUpdate>this.env.updateInterval){
+ 78this.env.lastUpdate=now;
+ 79this.env.setTimeout(afterExecute,0);
+ 80}else{
+ 81afterExecute();
+ 82}
+ 83return;
+ 84}
+ 85
+ 86varid=this.env.setInterval(function(){
+ 87if(action.finished){
+ 88self.env.clearInterval(id);
+ 89afterExecute();
+ 90}
+ 91},150);
+ 92};
+ 93
\ 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..bf486e9
--- /dev/null
+++ b/doc/symbols/src/src_Env.js.html
@@ -0,0 +1,179 @@
+
\ 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..906d872
--- /dev/null
+++ b/doc/symbols/src/src_Matchers.js.html
@@ -0,0 +1,280 @@
+
1jasmine.Matchers=function(env,actual,results){
+ 2this.env=env;
+ 3this.actual=actual;
+ 4this.passing_message='Passed.';
+ 5this.results=results||newjasmine.NestedResults();
+ 6};
+ 7
+ 8jasmine.Matchers.pp=function(str){
+ 9returnjasmine.util.htmlEscape(jasmine.pp(str));
+ 10};
+ 11
+ 12jasmine.Matchers.prototype.getResults=function(){
+ 13returnthis.results;
+ 14};
+ 15
+ 16jasmine.Matchers.prototype.report=function(result,failing_message,details){
+ 17this.results.addResult(newjasmine.ExpectationResult(result,result?this.passing_message:failing_message,details));
+ 18returnresult;
+ 19};
+ 20
+ 21/**
+ 22 * Matcher that compares the actual to the expected using ===.
+ 23 *
+ 24 * @param expected
+ 25 */
+ 26jasmine.Matchers.prototype.toBe=function(expected){
+ 27returnthis.report(this.actual===expected,'Expected<br /><br />'+jasmine.Matchers.pp(expected)
+ 28+'<br /><br />to be the same object as<br /><br />'+jasmine.Matchers.pp(this.actual)
+ 29+'<br />');
+ 30};
+ 31
+ 32/**
+ 33 * Matcher that compares the actual to the expected using !==
+ 34 * @param expected
+ 35 */
+ 36jasmine.Matchers.prototype.toNotBe=function(expected){
+ 37returnthis.report(this.actual!==expected,'Expected<br /><br />'+jasmine.Matchers.pp(expected)
+ 38+'<br /><br />to be a different object from actual, but they were the same.');
+ 39};
+ 40
+ 41/**
+ 42 * Matcher that compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.
+ 43 *
+ 44 * @param expected
+ 45 */
+ 46jasmine.Matchers.prototype.toEqual=function(expected){
+ 47varmismatchKeys=[];
+ 48varmismatchValues=[];
+ 49
+ 50varformatMismatches=function(name,array){
+ 51if(array.length==0)return'';
+ 52varerrorOutput='<br /><br />Different '+name+':<br />';
+ 53for(vari=0;i<array.length;i++){
+ 54errorOutput+=array[i]+'<br />';
+ 55}
+ 56returnerrorOutput;
+ 57};
+ 58
+ 59returnthis.report(this.env.equals_(this.actual,expected,mismatchKeys,mismatchValues),
+ 60'Expected<br /><br />'+jasmine.Matchers.pp(expected)
+ 61+'<br /><br />but got<br /><br />'+jasmine.Matchers.pp(this.actual)
+ 62+'<br />'
+ 63+formatMismatches('Keys',mismatchKeys)
+ 64+formatMismatches('Values',mismatchValues),{
+ 65matcherName:'toEqual',expected:expected,actual:this.actual
+ 66});
+ 67};
+ 68/** @deprecated */
+ 69jasmine.Matchers.prototype.should_equal=jasmine.Matchers.prototype.toEqual;
+ 70
+ 71/**
+ 72 * Matcher that compares the actual to the expected using the ! of jasmine.Matchers.toEqual
+ 73 * @param expected
+ 74 */
+ 75jasmine.Matchers.prototype.toNotEqual=function(expected){
+ 76returnthis.report(!this.env.equals_(this.actual,expected),
+ 77'Expected '+jasmine.Matchers.pp(expected)+' to not equal '+jasmine.Matchers.pp(this.actual)+', but it does.');
+ 78};
+ 79/** @deprecated */
+ 80jasmine.Matchers.prototype.should_not_equal=jasmine.Matchers.prototype.toNotEqual;
+ 81
+ 82/**
+ 83 * Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes
+ 84 * a pattern or a String.
+ 85 *
+ 86 * @param reg_exp
+ 87 */
+ 88jasmine.Matchers.prototype.toMatch=function(reg_exp){
+ 89returnthis.report((newRegExp(reg_exp).test(this.actual)),
+ 90'Expected '+jasmine.Matchers.pp(this.actual)+' to match '+reg_exp+'.');
+ 91};
+ 92/** @deprecated */
+ 93jasmine.Matchers.prototype.should_match=jasmine.Matchers.prototype.toMatch;
+ 94
+ 95/**
+ 96 * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
+ 97 * @param reg_exp
+ 98 */
+ 99jasmine.Matchers.prototype.toNotMatch=function(reg_exp){
+100returnthis.report((!newRegExp(reg_exp).test(this.actual)),
+101'Expected '+jasmine.Matchers.pp(this.actual)+' to not match '+reg_exp+'.');
+102};
+103/** @deprecated */
+104jasmine.Matchers.prototype.should_not_match=jasmine.Matchers.prototype.toNotMatch;
+105
+106/**
+107 * Matcher that compares the acutal to undefined.
+108 */
+109jasmine.Matchers.prototype.toBeDefined=function(){
+110returnthis.report((this.actual!==undefined),
+111'Expected a value to be defined but it was undefined.');
+112};
+113/** @deprecated */
+114jasmine.Matchers.prototype.should_be_defined=jasmine.Matchers.prototype.toBeDefined;
+115
+116/**
+117 * Matcher that compares the actual to null.
+118 *
+119 */
+120jasmine.Matchers.prototype.toBeNull=function(){
+121returnthis.report((this.actual===null),
+122'Expected a value to be null but it was '+jasmine.Matchers.pp(this.actual)+'.');
+123};
+124/** @deprecated */
+125jasmine.Matchers.prototype.should_be_null=jasmine.Matchers.prototype.toBeNull;
+126
+127/**
+128 * Matcher that boolean not-nots the actual.
+129 */
+130jasmine.Matchers.prototype.toBeTruthy=function(){
+131returnthis.report(!!this.actual,
+132'Expected a value to be truthy but it was '+jasmine.Matchers.pp(this.actual)+'.');
+133};
+134/** @deprecated */
+135jasmine.Matchers.prototype.should_be_truthy=jasmine.Matchers.prototype.toBeTruthy;
+136
+137/**
+138 * Matcher that boolean nots the actual.
+139 */
+140jasmine.Matchers.prototype.toBeFalsy=function(){
+141returnthis.report(!this.actual,
+142'Expected a value to be falsy but it was '+jasmine.Matchers.pp(this.actual)+'.');
+143};
+144/** @deprecated */
+145jasmine.Matchers.prototype.should_be_falsy=jasmine.Matchers.prototype.toBeFalsy;
+146
+147/**
+148 * Matcher that checks to see if the acutal, a Jasmine spy, was called.
+149 */
+150jasmine.Matchers.prototype.wasCalled=function(){
+151if(!this.actual||!this.actual.isSpy){
+152returnthis.report(false,'Expected a spy, but got '+jasmine.Matchers.pp(this.actual)+'.');
+153}
+154if(arguments.length>0){
+155returnthis.report(false,'wasCalled matcher does not take arguments');
+156}
+157returnthis.report((this.actual.wasCalled),
+158'Expected spy "'+this.actual.identity+'" to have been called, but it was not.');
+159};
+160/** @deprecated */
+161jasmine.Matchers.prototype.was_called=jasmine.Matchers.prototype.wasCalled;
+162
+163/**
+164 * Matcher that checks to see if the acutal, a Jasmine spy, was not called.
+165 */
+166jasmine.Matchers.prototype.wasNotCalled=function(){
+167if(!this.actual||!this.actual.isSpy){
+168returnthis.report(false,'Expected a spy, but got '+jasmine.Matchers.pp(this.actual)+'.');
+169}
+170returnthis.report((!this.actual.wasCalled),
+171'Expected spy "'+this.actual.identity+'" to not have been called, but it was.');
+172};
+173/** @deprecated */
+174jasmine.Matchers.prototype.was_not_called=jasmine.Matchers.prototype.wasNotCalled;
+175
+176/**
+177 * Matcher that checks to see if the acutal, a Jasmine spy, was called with a set of parameters.
+178 *
+179 * @example
+180 *
+181 */
+182jasmine.Matchers.prototype.wasCalledWith=function(){
+183if(!this.actual||!this.actual.isSpy){
+184returnthis.report(false,'Expected a spy, but got '+jasmine.Matchers.pp(this.actual)+'.',{
+185matcherName:'wasCalledWith'
+186});
+187}
+188
+189varargs=jasmine.util.argsToArray(arguments);
+190
+191returnthis.report(this.env.contains_(this.actual.argsForCall,args),
+192'Expected '+jasmine.Matchers.pp(this.actual.argsForCall)+' to contain '+jasmine.Matchers.pp(args)+', but it does not.',{
+193matcherName:'wasCalledWith',expected:args,actual:this.actual.argsForCall
+194});
+195};
+196
+197/**
+198 * Matcher that checks that the expected item is an element in the actual Array.
+199 *
+200 * @param {Object} item
+201 */
+202jasmine.Matchers.prototype.toContain=function(item){
+203returnthis.report(this.env.contains_(this.actual,item),
+204'Expected '+jasmine.Matchers.pp(this.actual)+' to contain '+jasmine.Matchers.pp(item)+', but it does not.',{
+205matcherName:'toContain',expected:item,actual:this.actual
+206});
+207};
+208
+209/**
+210 * Matcher that checks that the expected item is NOT an element in the actual Array.
+211 *
+212 * @param {Object} item
+213 */
+214jasmine.Matchers.prototype.toNotContain=function(item){
+215returnthis.report(!this.env.contains_(this.actual,item),
+216'Expected '+jasmine.Matchers.pp(this.actual)+' not to contain '+jasmine.Matchers.pp(item)+', but it does.');
+217};
+218
+219/**
+220 * Matcher that checks that the expected exception was thrown by the actual.
+221 *
+222 * @param {String} expectedException
+223 */
+224jasmine.Matchers.prototype.toThrow=function(expectedException){
+225varexception=null;
+226try{
+227this.actual();
+228}catch(e){
+229exception=e;
+230}
+231if(expectedException!==undefined){
+232if(exception==null){
+233returnthis.report(false,"Expected function to throw "+jasmine.Matchers.pp(expectedException)+", but it did not.");
+234}
+235returnthis.report(
+236this.env.equals_(
+237exception.message||exception,
+238expectedException.message||expectedException),
+239"Expected function to throw "+jasmine.Matchers.pp(expectedException)+", but it threw "+jasmine.Matchers.pp(exception)+".");
+240}else{
+241returnthis.report(exception!=null,"Expected function to throw an exception, but it did not.");
+242}
+243};
+244
+245jasmine.Matchers.Any=function(expectedClass){
+246this.expectedClass=expectedClass;
+247};
+248
+249jasmine.Matchers.Any.prototype.matches=function(other){
+250if(this.expectedClass==String){
+251returntypeofother=='string'||otherinstanceofString;
+252}
+253
+254if(this.expectedClass==Number){
+255returntypeofother=='number'||otherinstanceofNumber;
+256}
+257
+258if(this.expectedClass==Function){
+259returntypeofother=='function'||otherinstanceofFunction;
+260}
+261
+262if(this.expectedClass==Object){
+263returntypeofother=='object';
+264}
+265
+266returnotherinstanceofthis.expectedClass;
+267};
+268
+269jasmine.Matchers.Any.prototype.toString=function(){
+270return'<jasmine.any('+this.expectedClass+')>';
+271};
+272
+273
\ 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..47bc43a
--- /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 */
+ 6jasmine.NestedResults=function(){
+ 7/**
+ 8 * The total count of results
+ 9 */
+ 10this.totalCount=0;
+ 11/**
+ 12 * Number of passed results
+ 13 */
+ 14this.passedCount=0;
+ 15/**
+ 16 * Number of failed results
+ 17 */
+ 18this.failedCount=0;
+ 19/**
+ 20 * Was this suite/spec skipped?
+ 21 */
+ 22this.skipped=false;
+ 23/**
+ 24 * @ignore
+ 25 */
+ 26this.items_=[];
+ 27};
+ 28
+ 29/**
+ 30 * Roll up the result counts.
+ 31 *
+ 32 * @param result
+ 33 */
+ 34jasmine.NestedResults.prototype.rollupCounts=function(result){
+ 35this.totalCount+=result.totalCount;
+ 36this.passedCount+=result.passedCount;
+ 37this.failedCount+=result.failedCount;
+ 38};
+ 39
+ 40/**
+ 41 * Tracks a result's message.
+ 42 * @param message
+ 43 */
+ 44jasmine.NestedResults.prototype.log=function(message){
+ 45this.items_.push(newjasmine.MessageResult(message));
+ 46};
+ 47
+ 48/**
+ 49 * Getter for the results: message & results.
+ 50 */
+ 51jasmine.NestedResults.prototype.getItems=function(){
+ 52returnthis.items_;
+ 53};
+ 54
+ 55/**
+ 56 * Adds a result, tracking counts (total, passed, & failed)
+ 57 * @param {jasmine.ExpectationResult|jasmine.NestedResults} result
+ 58 */
+ 59jasmine.NestedResults.prototype.addResult=function(result){
+ 60if(result.type!='MessageResult'){
+ 61if(result.items_){
+ 62this.rollupCounts(result);
+ 63}else{
+ 64this.totalCount++;
+ 65if(result.passed){
+ 66this.passedCount++;
+ 67}else{
+ 68this.failedCount++;
+ 69}
+ 70}
+ 71}
+ 72this.items_.push(result);
+ 73};
+ 74
+ 75/**
+ 76 * @returns {Boolean} True if <b>everything</b> below passed
+ 77 */
+ 78jasmine.NestedResults.prototype.passed=function(){
+ 79returnthis.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..da77fcc
--- /dev/null
+++ b/doc/symbols/src/src_PrettyPrinter.js.html
@@ -0,0 +1,123 @@
+
\ No newline at end of file
diff --git a/doc/symbols/src/src_QueuedFunction.js.html b/doc/symbols/src/src_QueuedFunction.js.html
new file mode 100644
index 0000000..c3642a3
--- /dev/null
+++ b/doc/symbols/src/src_QueuedFunction.js.html
@@ -0,0 +1,94 @@
+
\ 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 */
+ 5jasmine.Reporters={};
+ 6
+ 7jasmine.Reporters.reporter=function(callbacks){
+ 8varthat={
+ 9callbacks:callbacks||{},
+ 10
+ 11doCallback:function(callback,results){
+ 12if(callback){
+ 13callback(results);
+ 14}
+ 15},
+ 16
+ 17reportRunnerResults:function(runner){
+ 18that.doCallback(that.callbacks.runnerCallback,runner);
+ 19},
+ 20reportSuiteResults:function(suite){
+ 21that.doCallback(that.callbacks.suiteCallback,suite);
+ 22},
+ 23reportSpecResults:function(spec){
+ 24that.doCallback(that.callbacks.specCallback,spec);
+ 25},
+ 26log:function(str){
+ 27if(console&&console.log)console.log(str);
+ 28}
+ 29};
+ 30
+ 31returnthat;
+ 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..2b828fa
--- /dev/null
+++ b/doc/symbols/src/src_Runner.js.html
@@ -0,0 +1,34 @@
+
\ 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..e75c5ad
--- /dev/null
+++ b/doc/symbols/src/src_Spec.js.html
@@ -0,0 +1,199 @@
+
\ 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..9157f41
--- /dev/null
+++ b/doc/symbols/src/src_Suite.js.html
@@ -0,0 +1,61 @@
+
\ 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..db29192
--- /dev/null
+++ b/doc/symbols/src/src_base.js.html
@@ -0,0 +1,517 @@
+
1/**
+ 2 * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
+ 3 *
+ 4 * @namespace
+ 5 */
+ 6varjasmine={};
+ 7
+ 8/**
+ 9 * @private
+ 10 */
+ 11jasmine.unimplementedMethod_=function(){
+ 12thrownewError("unimplemented method");
+ 13};
+ 14
+ 15/**
+ 16 * Allows for bound functions to be comapred. Internal use only.
+ 17 *
+ 18 * @ignore
+ 19 * @private
+ 20 * @param base {Object} bound 'this' for the function
+ 21 * @param name {Function} function to find
+ 22 */
+ 23jasmine.bindOriginal_=function(base,name){
+ 24varoriginal=base[name];
+ 25returnfunction(){
+ 26returnoriginal.apply(base,arguments);
+ 27};
+ 28};
+ 29
+ 30jasmine.setTimeout=jasmine.bindOriginal_(window,'setTimeout');
+ 31jasmine.clearTimeout=jasmine.bindOriginal_(window,'clearTimeout');
+ 32jasmine.setInterval=jasmine.bindOriginal_(window,'setInterval');
+ 33jasmine.clearInterval=jasmine.bindOriginal_(window,'clearInterval');
+ 34
+ 35jasmine.MessageResult=function(text){
+ 36this.type='MessageResult';
+ 37this.text=text;
+ 38this.trace=newError();// todo: test better
+ 39};
+ 40
+ 41jasmine.ExpectationResult=function(passed,message,details){
+ 42this.type='ExpectationResult';
+ 43this.passed=passed;
+ 44this.message=message;
+ 45this.details=details;
+ 46this.trace=newError(message);// todo: test better
+ 47};
+ 48
+ 49/**
+ 50 * Getter for the Jasmine environment. Ensures one gets created
+ 51 */
+ 52jasmine.getEnv=function(){
+ 53returnjasmine.currentEnv_=jasmine.currentEnv_||newjasmine.Env();
+ 54};
+ 55
+ 56/**
+ 57 * @ignore
+ 58 * @private
+ 59 * @param value
+ 60 * @returns {Boolean}
+ 61 */
+ 62jasmine.isArray_=function(value){
+ 63returnvalue&&
+ 64typeofvalue==='object'&&
+ 65typeofvalue.length==='number'&&
+ 66typeofvalue.splice==='function'&&
+ 67!(value.propertyIsEnumerable('length'));
+ 68};
+ 69
+ 70/**
+ 71 * Pretty printer for expecations. Takes any object and turns it into a human-readable string.
+ 72 *
+ 73 * @param value {Object} an object to be outputted
+ 74 * @returns {String}
+ 75 */
+ 76jasmine.pp=function(value){
+ 77varstringPrettyPrinter=newjasmine.StringPrettyPrinter();
+ 78stringPrettyPrinter.format(value);
+ 79returnstringPrettyPrinter.string;
+ 80};
+ 81
+ 82/**
+ 83 * Returns true if the object is a DOM Node.
+ 84 *
+ 85 * @param {Object} obj object to check
+ 86 * @returns {Boolean}
+ 87 */
+ 88jasmine.isDomNode=function(obj){
+ 89returnobj['nodeType']>0;
+ 90};
+ 91
+ 92/**
+ 93 * Returns a matchable 'generic' object of the class type. For use in expecations of type when values don't matter.
+ 94 *
+ 95 * @example
+ 96 * // don't care about which function is passed in, as long as it's a function
+ 97 * expect(mySpy).wasCalledWith(jasmine.any(Function));
+ 98 *
+ 99 * @param {Class} clazz
+100 * @returns matchable object of the type clazz
+101 */
+102jasmine.any=function(clazz){
+103returnnewjasmine.Matchers.Any(clazz);
+104};
+105
+106/**
+107 * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
+108 *
+109 * Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine
+110 * expectation syntax. Spies can be checked if they were called or not and what the calling params were.
+111 *
+112 * A Spy has the following mehtod: wasCalled, callCount, mostRecentCall, and argsForCall (see docs)
+113 * Spies are torn down at the end of every spec.
+114 *
+115 * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
+116 *
+117 * @example
+118 * // a stub
+119 * var myStub = jasmine.createSpy('myStub'); // can be used anywhere
+120 *
+121 * // spy example
+122 * var foo = {
+123 * not: function(bool) { return !bool; }
+124 * }
+125 *
+126 * // actual foo.not will not be called, execution stops
+127 * spyOn(foo, 'not');
+128
+129 // foo.not spied upon, execution will continue to implementation
+130 * spyOn(foo, 'not').andCallThrough();
+131 *
+132 * // fake example
+133 * var foo = {
+134 * not: function(bool) { return !bool; }
+135 * }
+136 *
+137 * // foo.not(val) will return val
+138 * spyOn(foo, 'not').andCallFake(function(value) {return value;});
+139 *
+140 * // mock example
+141 * foo.not(7 == 7);
+142 * expect(foo.not).wasCalled();
+143 * expect(foo.not).wasCalledWith(true);
+144 *
+145 * @constructor
+146 * @see spyOn, jasmine.createSpy, jasmine.createSpyObj
+147 * @param {String} name
+148 */
+149jasmine.Spy=function(name){
+150/**
+151 * The name of the spy, if provided.
+152 */
+153this.identity=name||'unknown';
+154/**
+155 * Is this Object a spy?
+156 */
+157this.isSpy=true;
+158/**
+159 * The acutal function this spy stubs.
+160 */
+161this.plan=function(){};
+162/**
+163 * Tracking of the most recent call to the spy.
+164 * @example
+165 * var mySpy = jasmine.createSpy('foo');
+166 * mySpy(1, 2);
+167 * mySpy.mostRecentCall.args = [1, 2];
+168 */
+169this.mostRecentCall={};
+170
+171/**
+172 * Holds arguments for each call to the spy, indexed by call count
+173 * @example
+174 * var mySpy = jasmine.createSpy('foo');
+175 * mySpy(1, 2);
+176 * mySpy(7, 8);
+177 * mySpy.mostRecentCall.args = [7, 8];
+178 * mySpy.argsForCall[0] = [1, 2];
+179 * mySpy.argsForCall[1] = [7, 8];
+180 */
+181this.argsForCall=[];
+182};
+183
+184/**
+185 * Tells a spy to call through to the actual implemenatation.
+186 *
+187 * @example
+188 * var foo = {
+189 * bar: function() { // do some stuff }
+190 * }
+191 *
+192 * // defining a spy on an existing property: foo.bar
+193 * spyOn(foo, 'bar').andCallThrough();
+194 */
+195jasmine.Spy.prototype.andCallThrough=function(){
+196this.plan=this.originalValue;
+197returnthis;
+198};
+199
+200/**
+201 * For setting the return value of a spy.
+202 *
+203 * @example
+204 * // defining a spy from scratch: foo() returns 'baz'
+205 * var foo = jasmine.createSpy('spy on foo').andReturn('baz');
+206 *
+207 * // defining a spy on an existing property: foo.bar() returns 'baz'
+208 * spyOn(foo, 'bar').andReturn('baz');
+209 *
+210 * @param {Object} value
+211 */
+212jasmine.Spy.prototype.andReturn=function(value){
+213this.plan=function(){
+214returnvalue;
+215};
+216returnthis;
+217};
+218
+219/**
+220 * For throwing an exception when a spy is called.
+221 *
+222 * @example
+223 * // defining a spy from scratch: foo() throws an exception w/ message 'ouch'
+224 * var foo = jasmine.createSpy('spy on foo').andThrow('baz');
+225 *
+226 * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
+227 * spyOn(foo, 'bar').andThrow('baz');
+228 *
+229 * @param {String} exceptionMsg
+230 */
+231jasmine.Spy.prototype.andThrow=function(exceptionMsg){
+232this.plan=function(){
+233throwexceptionMsg;
+234};
+235returnthis;
+236};
+237
+238/**
+239 * Calls an alternate implementation when a spy is called.
+240 *
+241 * @example
+242 * var baz = function() {
+243 * // do some stuff, return something
+244 * }
+245 * // defining a spy from scratch: foo() calls the function baz
+246 * var foo = jasmine.createSpy('spy on foo').andCall(baz);
+247 *
+248 * // defining a spy on an existing property: foo.bar() calls an anonymnous function
+249 * spyOn(foo, 'bar').andCall(function() { return 'baz';} );
+250 *
+251 * @param {Function} fakeFunc
+252 */
+253jasmine.Spy.prototype.andCallFake=function(fakeFunc){
+254this.plan=fakeFunc;
+255returnthis;
+256};
+257
+258/**
+259 * Resets all of a spy's the tracking variables so that it can be used again.
+260 *
+261 * @example
+262 * spyOn(foo, 'bar');
+263 *
+264 * foo.bar();
+265 *
+266 * expect(foo.bar.callCount).toEqual(1);
+267 *
+268 * foo.bar.reset();
+269 *
+270 * expect(foo.bar.callCount).toEqual(0);
+271 */
+272jasmine.Spy.prototype.reset=function(){
+273this.wasCalled=false;
+274this.callCount=0;
+275this.argsForCall=[];
+276this.mostRecentCall={};
+277};
+278
+279jasmine.createSpy=function(name){
+280
+281varspyObj=function(){
+282spyObj.wasCalled=true;
+283spyObj.callCount++;
+284varargs=jasmine.util.argsToArray(arguments);
+285//spyObj.mostRecentCall = {
+286// object: this,
+287// args: args
+288//};
+289spyObj.mostRecentCall.object=this;
+290spyObj.mostRecentCall.args=args;
+291spyObj.argsForCall.push(args);
+292returnspyObj.plan.apply(this,arguments);
+293};
+294
+295varspy=newjasmine.Spy(name);
+296
+297for(varpropinspy){
+298spyObj[prop]=spy[prop];
+299}
+300
+301spyObj.reset();
+302
+303returnspyObj;
+304};
+305
+306/**
+307 * Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something
+308 * large in one call.
+309 *
+310 * @param {String} baseName name of spy class
+311 * @param {Array} methodNames array of names of methods to make spies
+312 */
+313jasmine.createSpyObj=function(baseName,methodNames){
+314varobj={};
+315for(vari=0;i<methodNames.length;i++){
+316obj[methodNames[i]]=jasmine.createSpy(baseName+'.'+methodNames[i]);
+317}
+318returnobj;
+319};
+320
+321jasmine.log=function(message){
+322jasmine.getEnv().currentSpec.getResults().log(message);
+323};
+324
+325/**
+326 * Function that installs a spy on an existing object's method name. Used within a Spec to create a spy.
+327 *
+328 * @example
+329 * // spy example
+330 * var foo = {
+331 * not: function(bool) { return !bool; }
+332 * }
+333 * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
+334 *
+335 * @see jasmine.createSpy
+336 * @param obj
+337 * @param methodName
+338 * @returns a Jasmine spy that can be chained with all spy methods
+339 */
+340varspyOn=function(obj,methodName){
+341returnjasmine.getEnv().currentSpec.spyOn(obj,methodName);
+342};
+343
+344/**
+345 * Creates a Jasmine spec that will be added to the current suite.
+346 *
+347 * // TODO: pending tests
+348 *
+349 * @example
+350 * it('should be true', function() {
+351 * expect(true).toEqual(true);
+352 * });
+353 *
+354 * @param {String} desc description of this specification
+355 * @param {Function} func defines the preconditions and expectations of the spec
+356 */
+357varit=function(desc,func){
+358returnjasmine.getEnv().it(desc,func);
+359};
+360
+361/**
+362 * Creates a <em>disabled</em> Jasmine spec.
+363 *
+364 * A convenience method that allows existing specs to be disabled temporarily during development.
+365 *
+366 * @param {String} desc description of this specification
+367 * @param {Function} func defines the preconditions and expectations of the spec
+368 */
+369varxit=function(desc,func){
+370returnjasmine.getEnv().xit(desc,func);
+371};
+372
+373/**
+374 * Starts a chain for a Jasmine expectation.
+375 *
+376 * It is passed an Object that is the actual value and should chain to one of the many
+377 * jasmine.Matchers functions.
+378 *
+379 * @param {Object} actual Actual value to test against and expected value
+380 */
+381varexpect=function(actual){
+382returnjasmine.getEnv().currentSpec.expect(actual);
+383};
+384
+385/**
+386 * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs.
+387 *
+388 * @param {Function} func Function that defines part of a jasmine spec.
+389 */
+390varruns=function(func){
+391jasmine.getEnv().currentSpec.runs(func);
+392};
+393
+394/**
+395 * Waits for a timeout before moving to the next runs()-defined block.
+396 * @param {Number} timeout
+397 */
+398varwaits=function(timeout){
+399jasmine.getEnv().currentSpec.waits(timeout);
+400};
+401
+402/**
+403 * Waits for the latchFunction to return true before proceeding to the next runs()-defined block.
+404 *
+405 * @param {Number} timeout
+406 * @param {Function} latchFunction
+407 * @param {String} message
+408 */
+409varwaitsFor=function(timeout,latchFunction,message){
+410jasmine.getEnv().currentSpec.waitsFor(timeout,latchFunction,message);
+411};
+412
+413/**
+414 * A function that is called before each spec in a suite.
+415 *
+416 * Used for spec setup, including validating assumptions.
+417 *
+418 * @param {Function} beforeEachFunction
+419 */
+420varbeforeEach=function(beforeEachFunction){
+421jasmine.getEnv().beforeEach(beforeEachFunction);
+422};
+423
+424/**
+425 * A function that is called after each spec in a suite.
+426 *
+427 * Used for restoring any state that is hijacked during spec execution.
+428 *
+429 * @param {Function} afterEachFunction
+430 */
+431varafterEach=function(afterEachFunction){
+432jasmine.getEnv().afterEach(afterEachFunction);
+433};
+434
+435/**
+436 * Defines a suite of specifications.
+437 *
+438 * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
+439 * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
+440 * of setup in some tests.
+441 *
+442 * @example
+443 * // TODO: a simple suite
+444 *
+445 * // TODO: a simple suite with a nested describe block
+446 *
+447 * @param {String} description A string, usually the class under test.
+448 * @param {Function} specDefinitions function that defines several specs.
+449 */
+450vardescribe=function(description,specDefinitions){
+451returnjasmine.getEnv().describe(description,specDefinitions);
+452};
+453
+454/**
+455 * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development.
+456 *
+457 * @param {String} description A string, usually the class under test.
+458 * @param {Function} specDefinitions function that defines several specs.
+459 */
+460varxdescribe=function(description,specDefinitions){
+461returnjasmine.getEnv().xdescribe(description,specDefinitions);
+462};
+463
+464
+465jasmine.XmlHttpRequest=XMLHttpRequest;
+466
+467// Provide the XMLHttpRequest class for IE 5.x-6.x:
+468if(typeofXMLHttpRequest=="undefined")jasmine.XmlHttpRequest=function(){
+469try{
+470returnnewActiveXObject("Msxml2.XMLHTTP.6.0");
+471}catch(e){
+472}
+473try{
+474returnnewActiveXObject("Msxml2.XMLHTTP.3.0");
+475}catch(e){
+476}
+477try{
+478returnnewActiveXObject("Msxml2.XMLHTTP");
+479}catch(e){
+480}
+481try{
+482returnnewActiveXObject("Microsoft.XMLHTTP");
+483}catch(e){
+484}
+485thrownewError("This browser does not support XMLHttpRequest.");
+486};
+487
+488/**
+489 * Adds suite files to an HTML document so that they are executed, thus adding them to the current
+490 * Jasmine environment.
+491 *
+492 * @param {String} url path to the file to include
+493 * @param {Boolean} opt_global
+494 */
+495jasmine.include=function(url,opt_global){
+496if(opt_global){
+497document.write('<script type="text/javascript" src="'+url+'"></'+'script>');
+498}else{
+499varxhr;
+500try{
+501xhr=newjasmine.XmlHttpRequest();
+502xhr.open("GET",url,false);
+503xhr.send(null);
+504}catch(e){
+505thrownewError("couldn't fetch "+url+": "+e);
+506}
+507
+508returneval(xhr.responseText);
+509}
+510};
\ No newline at end of file
diff --git a/doc/symbols/src/src_jsUnitMockTimeout.js.html b/doc/symbols/src/src_jsUnitMockTimeout.js.html
new file mode 100644
index 0000000..0dd3928
--- /dev/null
+++ b/doc/symbols/src/src_jsUnitMockTimeout.js.html
@@ -0,0 +1,89 @@
+
\ 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..7d80a0e
--- /dev/null
+++ b/doc/symbols/src/src_util.js.html
@@ -0,0 +1,67 @@
+