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() {
@ -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));
};
/** @deprecated */
jasmine.Matchers.prototype.getResults = function() {
return this.results_;
};
jasmine.Matchers.prototype.results = function() {
return this.results_;
};
@ -70,8 +65,6 @@ jasmine.Matchers.prototype.toEqual = function(expected) {
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
@ -81,8 +74,6 @@ jasmine.Matchers.prototype.toNotEqual = function(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.');
};
/** @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
@ -94,8 +85,6 @@ jasmine.Matchers.prototype.toMatch = function(reg_exp) {
return this.report((new RegExp(reg_exp).test(this.actual)),
'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
@ -105,8 +94,6 @@ jasmine.Matchers.prototype.toNotMatch = function(reg_exp) {
return this.report((!new RegExp(reg_exp).test(this.actual)),
'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.
@ -115,8 +102,6 @@ jasmine.Matchers.prototype.toBeDefined = function() {
return this.report((this.actual !== 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.
@ -126,8 +111,6 @@ jasmine.Matchers.prototype.toBeNull = function() {
return this.report((this.actual === null),
'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.
@ -136,8 +119,6 @@ jasmine.Matchers.prototype.toBeTruthy = function() {
return this.report(!!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.
@ -146,8 +127,6 @@ jasmine.Matchers.prototype.toBeFalsy = function() {
return this.report(!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.
@ -162,8 +141,6 @@ jasmine.Matchers.prototype.wasCalled = function() {
return this.report((this.actual.wasCalled),
'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.
@ -175,8 +152,6 @@ jasmine.Matchers.prototype.wasNotCalled = function() {
return this.report((!this.actual.wasCalled),
'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.

View File

@ -49,11 +49,6 @@ jasmine.Runner.prototype.add = function(block) {
this.queue.add(block);
};
/** @deprecated */
jasmine.Runner.prototype.getAllSuites = function() {
return this.suites_;
};
jasmine.Runner.prototype.specs = function () {
var suites = this.suites();
var specs = [];
@ -70,9 +65,4 @@ jasmine.Runner.prototype.suites = function() {
jasmine.Runner.prototype.results = function() {
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);
};
/** @deprecated */
jasmine.Spec.prototype.getResults = function() {
return this.results_;
};
jasmine.Spec.prototype.runs = function (func) {
var block = new jasmine.Block(this.env, func, this);
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) {
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);
};
/** @deprecated */
jasmine.Suite.prototype.getResults = function() {
return this.queue.results();
};
jasmine.Suite.prototype.results = function() {
return this.queue.results();
};
@ -63,11 +58,6 @@ jasmine.Suite.prototype.add = function(block) {
this.queue.add(block);
};
/** @deprecated */
jasmine.Suite.prototype.specCount = function() {
return this.specs_.length;
};
jasmine.Suite.prototype.specs = function() {
return this.specs_;
};