Remove Matchers report code cruft.

- Code that used reportWasCalled was removed previously.
This commit is contained in:
Davis W. Frank & Rajan Agaskar
2012-11-29 15:55:46 -08:00
parent cd3a0c854b
commit 1f5e790c41

View File

@@ -9,7 +9,6 @@ jasmine.Matchers = function(env, actual, spec, opt_isNot) {
this.actual = actual;
this.spec = spec;
this.isNot = opt_isNot || false;
this.reportWasCalled_ = false;
};
// todo: @deprecated as of Jasmine 0.11, remove soon [xw]
@@ -17,14 +16,8 @@ jasmine.Matchers.pp = function(str) {
throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!");
};
// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw]
jasmine.Matchers.prototype.report = function(result, failing_message, details) {
throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs");
};
jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) {
for (var methodName in prototype) {
if (methodName == 'report') continue;
var orig = prototype[methodName];
matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig);
}
@@ -39,8 +32,6 @@ jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
result = !result;
}
if (this.reportWasCalled_) return result;
var message;
if (!result) {
if (this.message) {