Created
July 31, 2013 11:21
-
-
Save kristoferjoseph/6121218 to your computer and use it in GitHub Desktop.
Example of Squire and Sinon set up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var injector = new Squire(); | |
module("Grid", { | |
setup: function () { | |
injector.mock({ | |
"modules/utils/eventmap": { | |
subscribe: sinon.stub() | |
}, | |
"modules/grid/models/gridmodel": sinon.stub().returns(Backbone.Model), | |
"modules/grid/views/gridview": sinon.stub().returns(Backbone.View) | |
}); | |
this.sandbox = sinon.sandbox.create(); | |
}, | |
teardown: function () { | |
this.sandbox.restore(); | |
injector.clean(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment