use jasmineMatches for equality testing of complicated matchers

This commit is contained in:
gvanhove
2011-03-15 08:23:38 -07:00
parent 4f2fcff15a
commit 67ec0af254
4 changed files with 154 additions and 6 deletions

View File

@@ -345,7 +345,7 @@ jasmine.Matchers.Any = function(expectedClass) {
this.expectedClass = expectedClass;
};
jasmine.Matchers.Any.prototype.matches = function(other) {
jasmine.Matchers.Any.prototype.jasmineMatches = function(other) {
if (this.expectedClass == String) {
return typeof other == 'string' || other instanceof String;
}