Fix error message in jasmine.any

The expected any 'class' was not being included in the error message
due to accessing the wrong property
This commit is contained in:
Sheel Choksi
2014-02-09 14:06:40 -08:00
parent 289c8313d1
commit 83c0ea7f91
3 changed files with 3 additions and 2 deletions

View File

@@ -819,7 +819,7 @@ getJasmineRequireObj().Any = function() {
}; };
Any.prototype.jasmineToString = function() { Any.prototype.jasmineToString = function() {
return '<jasmine.any(' + this.expectedClass + ')>'; return '<jasmine.any(' + this.expectedObject + ')>';
}; };
return Any; return Any;

View File

@@ -40,6 +40,7 @@ describe("Any", function() {
var any = new j$.Any(Number); var any = new j$.Any(Number);
expect(any.jasmineToString()).toMatch('<jasmine.any'); expect(any.jasmineToString()).toMatch('<jasmine.any');
expect(any.jasmineToString()).toMatch('Number');
}); });
}); });

View File

@@ -29,7 +29,7 @@ getJasmineRequireObj().Any = function() {
}; };
Any.prototype.jasmineToString = function() { Any.prototype.jasmineToString = function() {
return '<jasmine.any(' + this.expectedClass + ')>'; return '<jasmine.any(' + this.expectedObject + ')>';
}; };
return Any; return Any;