dwF: moving toNotEqual to report !this.env.equals_ instead of a straight !==

This commit is contained in:
Davis W. Frank 2009-06-14 23:14:20 -07:00
parent 9b712613c5
commit 8f13a631e7

View File

@ -60,7 +60,7 @@ jasmine.Matchers.prototype.toEqual = function(expected) {
jasmine.Matchers.prototype.should_equal = jasmine.Matchers.prototype.toEqual; jasmine.Matchers.prototype.should_equal = jasmine.Matchers.prototype.toEqual;
jasmine.Matchers.prototype.toNotEqual = function(expected) { jasmine.Matchers.prototype.toNotEqual = function(expected) {
return this.report((this.actual !== expected), return this.report(!this.env.equals_(this.actual, expected),
'Expected ' + jasmine.Matchers.pp(expected) + ' to not equal ' + jasmine.Matchers.pp(this.actual) + ', but it does.'); 'Expected ' + jasmine.Matchers.pp(expected) + ' to not equal ' + jasmine.Matchers.pp(this.actual) + ', but it does.');
}; };
/** @deprecated */ /** @deprecated */