Wrap base matchers from jasmine.Matcher prototype automatically at env instantiation time rather than manually.

This commit is contained in:
Christian Williams
2009-11-13 14:32:08 -05:00
parent 2fc78a0fe2
commit 1a53838d97
4 changed files with 121 additions and 153 deletions

View File

@@ -10,11 +10,9 @@ jasmine.Spec = function(env, suite, description) {
if (!env) {
throw new Error('jasmine.Env() required');
}
;
if (!suite) {
throw new Error('jasmine.Suite() required');
}
;
var spec = this;
spec.id = env.nextSpecId ? env.nextSpecId() : null;
spec.env = env;
@@ -91,7 +89,7 @@ jasmine.Spec.prototype.fail = function (e) {
};
jasmine.Spec.prototype.getMatchersClass_ = function() {
return this.matchersClass || jasmine.Matchers;
return this.matchersClass || this.env.matchersClass;
};
jasmine.Spec.prototype.addMatchers = function(matchersPrototype) {