carl/bosh - merge pockets pudge changes in and update bootstrap to include some missing src files

This commit is contained in:
pivotal 2009-07-28 17:27:52 -07:00
parent 5ae68b8c3b
commit 4cfb7ddd42
6 changed files with 20 additions and 8 deletions

View File

@ -587,6 +587,7 @@ jasmine.Env = function() {
};
this.nextSpecId_ = 0;
this.nextSuiteId_ = 0;
this.equalityTesters_ = [];
};
@ -1465,9 +1466,9 @@ jasmine.NestedResults.prototype.addResult = function(result) {
/**
* @returns {Boolean} True if <b>everything</b> below passed
*/
jasmine.NestedResults.prototype.passed = function() {
jasmine.NestedResults.prototype.__defineGetter__('passed', function() {
return this.passedCount === this.totalCount;
};
});
/**
* Base class for pretty printing for expectation results.
*/
@ -1498,7 +1499,7 @@ jasmine.PrettyPrinter.prototype.format = function(value) {
} else if (value instanceof jasmine.Matchers.Any) {
this.emitScalar(value.toString());
} else if (typeof value === 'string') {
this.emitScalar("'" + value + "'");
this.emitScalar(value);
} else if (typeof value === 'function') {
this.emitScalar('Function');
} else if (typeof value.nodeType === 'number') {
@ -1946,6 +1947,7 @@ jasmine.Spec.prototype.removeAllSpies = function() {
jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
jasmine.ActionCollection.call(this, env);
this.id = env.nextSuiteId_++;
this.description = description;
this.specs = this.actions;
this.parentSuite = parentSuite;
@ -1979,6 +1981,9 @@ jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
jasmine.Suite.prototype.getResults = function() {
var results = new jasmine.NestedResults();
results.description = this.description;
results.id = this.id;
for (var i = 0; i < this.specs.length; i++) {
results.rollupCounts(this.specs[i].getResults());
}

View File

@ -15,7 +15,9 @@
<script type="text/javascript" src="../src/NestedResults.js"></script>
<script type="text/javascript" src="../src/PrettyPrinter.js"></script>
<script type="text/javascript" src="../src/QueuedFunction.js"></script>
<script type="text/javascript" src="../src/Reporter.js"></script>
<script type="text/javascript" src="../src/Reporters.js"></script>
<script type="text/javascript" src="../src/MultiReporter.js"></script>
<script type="text/javascript" src="../src/Runner.js"></script>
<script type="text/javascript" src="../src/Spec.js"></script>
<script type="text/javascript" src="../src/Suite.js"></script>

View File

@ -18,6 +18,7 @@ jasmine.Env = function() {
};
this.nextSpecId_ = 0;
this.nextSuiteId_ = 0;
this.equalityTesters_ = [];
};

View File

@ -75,6 +75,6 @@ jasmine.NestedResults.prototype.addResult = function(result) {
/**
* @returns {Boolean} True if <b>everything</b> below passed
*/
jasmine.NestedResults.prototype.passed = function() {
jasmine.NestedResults.prototype.__defineGetter__('passed', function() {
return this.passedCount === this.totalCount;
};
});

View File

@ -28,7 +28,7 @@ jasmine.PrettyPrinter.prototype.format = function(value) {
} else if (value instanceof jasmine.Matchers.Any) {
this.emitScalar(value.toString());
} else if (typeof value === 'string') {
this.emitScalar("'" + value + "'");
this.emitScalar(value);
} else if (typeof value === 'function') {
this.emitScalar('Function');
} else if (typeof value.nodeType === 'number') {

View File

@ -10,6 +10,7 @@
jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
jasmine.ActionCollection.call(this, env);
this.id = env.nextSuiteId_++;
this.description = description;
this.specs = this.actions;
this.parentSuite = parentSuite;
@ -43,6 +44,9 @@ jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
jasmine.Suite.prototype.getResults = function() {
var results = new jasmine.NestedResults();
results.description = this.description;
results.id = this.id;
for (var i = 0; i < this.specs.length; i++) {
results.rollupCounts(this.specs[i].getResults());
}