Compare commits
No commits in common. "class-names-as-descriptions" and "master" have entirely different histories.
class-name
...
master
|
@ -1917,7 +1917,7 @@ jasmine.Spec = function(env, suite, description) {
|
||||||
};
|
};
|
||||||
|
|
||||||
jasmine.Spec.prototype.getFullName = function() {
|
jasmine.Spec.prototype.getFullName = function() {
|
||||||
var description = (typeof this.description == 'function' || this.description instanceof Function) ? this.description.name : this.description;
|
var description = (this.description.apply ? this.description.name : this.description);
|
||||||
return this.suite.getFullName() + ' ' + description + '.';
|
return this.suite.getFullName() + ' ' + description + '.';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2154,17 +2154,13 @@ jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
|
||||||
};
|
};
|
||||||
|
|
||||||
jasmine.Suite.prototype.getFullName = function() {
|
jasmine.Suite.prototype.getFullName = function() {
|
||||||
var fullName = this.getDescription()
|
var fullName = (this.description.apply ? this.description.name : this.description);
|
||||||
for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
|
for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
|
||||||
fullName = parentSuite.getDescription() + ' ' + fullName;
|
fullName = parentSuite.description + ' ' + fullName;
|
||||||
}
|
}
|
||||||
return fullName;
|
return fullName;
|
||||||
};
|
};
|
||||||
|
|
||||||
jasmine.Suite.prototype.getDescription = function() {
|
|
||||||
return (typeof this.description == 'function' || this.description instanceof Function) ? this.description.name : this.description;
|
|
||||||
};
|
|
||||||
|
|
||||||
jasmine.Suite.prototype.finish = function(onComplete) {
|
jasmine.Suite.prototype.finish = function(onComplete) {
|
||||||
this.env.reporter.reportSuiteResults(this);
|
this.env.reporter.reportSuiteResults(this);
|
||||||
this.finished = true;
|
this.finished = true;
|
||||||
|
@ -2473,5 +2469,5 @@ jasmine.version_= {
|
||||||
"major": 1,
|
"major": 1,
|
||||||
"minor": 1,
|
"minor": 1,
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"revision": 1307554069
|
"revision": 1307455841
|
||||||
};
|
};
|
||||||
|
|
|
@ -80,18 +80,6 @@ describe('Suite', function() {
|
||||||
expect(suite.getFullName()).toEqual("MyClass");
|
expect(suite.getFullName()).toEqual("MyClass");
|
||||||
expect(suite.children()[0].getFullName()).toEqual("MyClass should be something.");
|
expect(suite.children()[0].getFullName()).toEqual("MyClass should be something.");
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should use the name of the parent suite correctly', function() {
|
|
||||||
suite = env.describe(MyClass, function() {
|
|
||||||
env.describe('nested', function() {
|
|
||||||
env.it('should be something', function() {
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(suite.getFullName()).toEqual("MyClass");
|
|
||||||
expect(suite.suites()[0].getFullName()).toEqual("MyClass nested");
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ jasmine.Spec = function(env, suite, description) {
|
||||||
};
|
};
|
||||||
|
|
||||||
jasmine.Spec.prototype.getFullName = function() {
|
jasmine.Spec.prototype.getFullName = function() {
|
||||||
var description = (typeof this.description == 'function' || this.description instanceof Function) ? this.description.name : this.description;
|
var description = (this.description.apply ? this.description.name : this.description);
|
||||||
return this.suite.getFullName() + ' ' + description + '.';
|
return this.suite.getFullName() + ' ' + description + '.';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,17 +22,13 @@ jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
|
||||||
};
|
};
|
||||||
|
|
||||||
jasmine.Suite.prototype.getFullName = function() {
|
jasmine.Suite.prototype.getFullName = function() {
|
||||||
var fullName = this.getDescription()
|
var fullName = (this.description.apply ? this.description.name : this.description);
|
||||||
for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
|
for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
|
||||||
fullName = parentSuite.getDescription() + ' ' + fullName;
|
fullName = parentSuite.description + ' ' + fullName;
|
||||||
}
|
}
|
||||||
return fullName;
|
return fullName;
|
||||||
};
|
};
|
||||||
|
|
||||||
jasmine.Suite.prototype.getDescription = function() {
|
|
||||||
return (typeof this.description == 'function' || this.description instanceof Function) ? this.description.name : this.description;
|
|
||||||
};
|
|
||||||
|
|
||||||
jasmine.Suite.prototype.finish = function(onComplete) {
|
jasmine.Suite.prototype.finish = function(onComplete) {
|
||||||
this.env.reporter.reportSuiteResults(this);
|
this.env.reporter.reportSuiteResults(this);
|
||||||
this.finished = true;
|
this.finished = true;
|
||||||
|
|
Loading…
Reference in New Issue