Skip to content

Instantly share code, notes, and snippets.

@kristoferjoseph
Created July 31, 2013 11:21
Show Gist options
  • Save kristoferjoseph/6121218 to your computer and use it in GitHub Desktop.
Save kristoferjoseph/6121218 to your computer and use it in GitHub Desktop.
Example of Squire and Sinon set up
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