Remove @deprecated methods.

This commit is contained in:
Christian Williams 2009-10-19 17:53:29 -07:00 committed by Christian Williams
parent 6b3bf1b3ba
commit b6e408aab8
5 changed files with 2 additions and 60 deletions

View File

@ -68,7 +68,7 @@ describe('Suite', function() {
}); });
}); });
expect(suite.specCount()).toEqual(3); expect(suite.specs().length).toEqual(3);
}); });
it('specCount should be correct even with runs/waits blocks', function() { it('specCount should be correct even with runs/waits blocks', function() {
@ -94,7 +94,7 @@ describe('Suite', function() {
}); });
}); });
expect(suite.specCount()).toEqual(3); expect(suite.specs().length).toEqual(3);
}); });
}); });
}); });

View File

@ -9,11 +9,6 @@ jasmine.Matchers.pp = function(str) {
return jasmine.util.htmlEscape(jasmine.pp(str)); return jasmine.util.htmlEscape(jasmine.pp(str));
}; };
/** @deprecated */
jasmine.Matchers.prototype.getResults = function() {
return this.results_;
};
jasmine.Matchers.prototype.results = function() { jasmine.Matchers.prototype.results = function() {
return this.results_; return this.results_;
}; };
@ -70,8 +65,6 @@ jasmine.Matchers.prototype.toEqual = function(expected) {
matcherName: 'toEqual', expected: expected, actual: this.actual matcherName: 'toEqual', expected: expected, actual: this.actual
}); });
}; };
/** @deprecated */
jasmine.Matchers.prototype.should_equal = jasmine.Matchers.prototype.toEqual;
/** /**
* Matcher that compares the actual to the expected using the ! of jasmine.Matchers.toEqual * Matcher that compares the actual to the expected using the ! of jasmine.Matchers.toEqual
@ -81,8 +74,6 @@ jasmine.Matchers.prototype.toNotEqual = function(expected) {
return this.report(!this.env.equals_(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 */
jasmine.Matchers.prototype.should_not_equal = jasmine.Matchers.prototype.toNotEqual;
/** /**
* Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes * Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes
@ -94,8 +85,6 @@ jasmine.Matchers.prototype.toMatch = function(reg_exp) {
return this.report((new RegExp(reg_exp).test(this.actual)), return this.report((new RegExp(reg_exp).test(this.actual)),
'Expected ' + jasmine.Matchers.pp(this.actual) + ' to match ' + reg_exp + '.'); 'Expected ' + jasmine.Matchers.pp(this.actual) + ' to match ' + reg_exp + '.');
}; };
/** @deprecated */
jasmine.Matchers.prototype.should_match = jasmine.Matchers.prototype.toMatch;
/** /**
* Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
@ -105,8 +94,6 @@ jasmine.Matchers.prototype.toNotMatch = function(reg_exp) {
return this.report((!new RegExp(reg_exp).test(this.actual)), return this.report((!new RegExp(reg_exp).test(this.actual)),
'Expected ' + jasmine.Matchers.pp(this.actual) + ' to not match ' + reg_exp + '.'); 'Expected ' + jasmine.Matchers.pp(this.actual) + ' to not match ' + reg_exp + '.');
}; };
/** @deprecated */
jasmine.Matchers.prototype.should_not_match = jasmine.Matchers.prototype.toNotMatch;
/** /**
* Matcher that compares the acutal to undefined. * Matcher that compares the acutal to undefined.
@ -115,8 +102,6 @@ jasmine.Matchers.prototype.toBeDefined = function() {
return this.report((this.actual !== undefined), return this.report((this.actual !== undefined),
'Expected a value to be defined but it was undefined.'); 'Expected a value to be defined but it was undefined.');
}; };
/** @deprecated */
jasmine.Matchers.prototype.should_be_defined = jasmine.Matchers.prototype.toBeDefined;
/** /**
* Matcher that compares the actual to null. * Matcher that compares the actual to null.
@ -126,8 +111,6 @@ jasmine.Matchers.prototype.toBeNull = function() {
return this.report((this.actual === null), return this.report((this.actual === null),
'Expected a value to be null but it was ' + jasmine.Matchers.pp(this.actual) + '.'); 'Expected a value to be null but it was ' + jasmine.Matchers.pp(this.actual) + '.');
}; };
/** @deprecated */
jasmine.Matchers.prototype.should_be_null = jasmine.Matchers.prototype.toBeNull;
/** /**
* Matcher that boolean not-nots the actual. * Matcher that boolean not-nots the actual.
@ -136,8 +119,6 @@ jasmine.Matchers.prototype.toBeTruthy = function() {
return this.report(!!this.actual, return this.report(!!this.actual,
'Expected a value to be truthy but it was ' + jasmine.Matchers.pp(this.actual) + '.'); 'Expected a value to be truthy but it was ' + jasmine.Matchers.pp(this.actual) + '.');
}; };
/** @deprecated */
jasmine.Matchers.prototype.should_be_truthy = jasmine.Matchers.prototype.toBeTruthy;
/** /**
* Matcher that boolean nots the actual. * Matcher that boolean nots the actual.
@ -146,8 +127,6 @@ jasmine.Matchers.prototype.toBeFalsy = function() {
return this.report(!this.actual, return this.report(!this.actual,
'Expected a value to be falsy but it was ' + jasmine.Matchers.pp(this.actual) + '.'); 'Expected a value to be falsy but it was ' + jasmine.Matchers.pp(this.actual) + '.');
}; };
/** @deprecated */
jasmine.Matchers.prototype.should_be_falsy = jasmine.Matchers.prototype.toBeFalsy;
/** /**
* Matcher that checks to see if the acutal, a Jasmine spy, was called. * Matcher that checks to see if the acutal, a Jasmine spy, was called.
@ -162,8 +141,6 @@ jasmine.Matchers.prototype.wasCalled = function() {
return this.report((this.actual.wasCalled), return this.report((this.actual.wasCalled),
'Expected spy "' + this.actual.identity + '" to have been called, but it was not.'); 'Expected spy "' + this.actual.identity + '" to have been called, but it was not.');
}; };
/** @deprecated */
jasmine.Matchers.prototype.was_called = jasmine.Matchers.prototype.wasCalled;
/** /**
* Matcher that checks to see if the acutal, a Jasmine spy, was not called. * Matcher that checks to see if the acutal, a Jasmine spy, was not called.
@ -175,8 +152,6 @@ jasmine.Matchers.prototype.wasNotCalled = function() {
return this.report((!this.actual.wasCalled), return this.report((!this.actual.wasCalled),
'Expected spy "' + this.actual.identity + '" to not have been called, but it was.'); 'Expected spy "' + this.actual.identity + '" to not have been called, but it was.');
}; };
/** @deprecated */
jasmine.Matchers.prototype.was_not_called = jasmine.Matchers.prototype.wasNotCalled;
/** /**
* Matcher that checks to see if the acutal, a Jasmine spy, was called with a set of parameters. * Matcher that checks to see if the acutal, a Jasmine spy, was called with a set of parameters.

View File

@ -49,11 +49,6 @@ jasmine.Runner.prototype.add = function(block) {
this.queue.add(block); this.queue.add(block);
}; };
/** @deprecated */
jasmine.Runner.prototype.getAllSuites = function() {
return this.suites_;
};
jasmine.Runner.prototype.specs = function () { jasmine.Runner.prototype.specs = function () {
var suites = this.suites(); var suites = this.suites();
var specs = []; var specs = [];
@ -71,8 +66,3 @@ jasmine.Runner.prototype.suites = function() {
jasmine.Runner.prototype.results = function() { jasmine.Runner.prototype.results = function() {
return this.queue.results(); return this.queue.results();
}; };
/** @deprecated */
jasmine.Runner.prototype.getResults = function() {
return this.queue.results();
};

View File

@ -43,11 +43,6 @@ jasmine.Spec.prototype.log = function(message) {
return this.results_.log(message); return this.results_.log(message);
}; };
/** @deprecated */
jasmine.Spec.prototype.getResults = function() {
return this.results_;
};
jasmine.Spec.prototype.runs = function (func) { jasmine.Spec.prototype.runs = function (func) {
var block = new jasmine.Block(this.env, func, this); var block = new jasmine.Block(this.env, func, this);
this.addToQueue(block); this.addToQueue(block);
@ -62,14 +57,6 @@ jasmine.Spec.prototype.addToQueue = function (block) {
} }
}; };
/**
* @private
* @deprecated
*/
jasmine.Spec.prototype.expects_that = function(actual) {
return this.expect(actual);
};
jasmine.Spec.prototype.expect = function(actual) { jasmine.Spec.prototype.expect = function(actual) {
return new (this.getMatchersClass_())(this.env, actual, this.results_); return new (this.getMatchersClass_())(this.env, actual, this.results_);
}; };

View File

@ -45,11 +45,6 @@ jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
this.after_.push(afterEachFunction); this.after_.push(afterEachFunction);
}; };
/** @deprecated */
jasmine.Suite.prototype.getResults = function() {
return this.queue.results();
};
jasmine.Suite.prototype.results = function() { jasmine.Suite.prototype.results = function() {
return this.queue.results(); return this.queue.results();
}; };
@ -63,11 +58,6 @@ jasmine.Suite.prototype.add = function(block) {
this.queue.add(block); this.queue.add(block);
}; };
/** @deprecated */
jasmine.Suite.prototype.specCount = function() {
return this.specs_.length;
};
jasmine.Suite.prototype.specs = function() { jasmine.Suite.prototype.specs = function() {
return this.specs_; return this.specs_;
}; };