how to unit test controller which uses this.get('store')
问题 I am unit testing my controller using mocha. My controller looks like: AS.MyController = Ember.ObjectController.extend(Ember.Validations.Mixin, { name: null, description: null, init: function () { this._super(); this.get('store').find('something'); }, .... }); And my test begins like: describe("MyControllerTest", function () { //tried but didn't work //delete AS.MyController.init; var controller = AS.MyController.create(); ..... }) and the browser always throws error on "this.get('store')"