[mockState] allow passing in default values

This commit is contained in:
Joe Fleming 2015-04-28 15:16:27 -07:00
parent 34148143ad
commit f4f65662b5

View file

@ -2,10 +2,11 @@ define(function (require) {
var _ = require('lodash');
var sinon = require('test_utils/auto_release_sinon');
function MockState() {
function MockState(defaults) {
this.on = _.noop;
this.off = _.noop;
this.save = sinon.stub();
_.assign(this, defaults);
}
MockState.prototype.resetStub = function () {