Remove Adaptor#_noop function

This commit is contained in:
Andrew Stewart 2014-09-22 09:53:10 -07:00
parent 333dc881ea
commit 1b549f2dbb
2 changed files with 0 additions and 28 deletions

View File

@ -29,13 +29,3 @@ var Adaptor = module.exports = function Adaptor(opts) {
Utils.subclass(Adaptor, Basestar);
Adaptor.prototype.commands = [];
// Public: Voids all command functions so they do not interact
// with anything after disconnect has been called.
//
// Returns nothing
Adaptor.prototype._noop = function() {
this.commands.forEach(function(command) {
this[command] = function() {};
}.bind(this));
};

View File

@ -23,22 +23,4 @@ describe("Adaptor", function() {
expect(adaptor.commands).to.be.eql([]);
});
});
describe("#_noop", function() {
var hello;
beforeEach(function() {
adaptor.commands = ["hello"];
hello = adaptor.hello = spy();
});
it("sets all adaptor commands to no-op functions", function() {
expect(adaptor.hello).to.be.eql(hello);
adaptor._noop();
adaptor.hello();
expect(hello).to.not.be.called;
});
});
});