{"action":"closed","issue":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/12457","labels_url":"https://api.github.com/repos/emberjs/ember.js/issues/12457/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/12457/comments","events_url":"https://api.github.com/repos/emberjs/ember.js/issues/12457/events","html_url":"https://github.com/emberjs/ember.js/issues/12457","id":110298752,"number":12457,"title":"can no longer stub/spy (via sinon) on `_super` call in Ember 2.1, 2.2-beta.1","user":{"login":"david-casagrande","id":1671141,"avatar_url":"https://avatars.githubusercontent.com/u/1671141?v=3","gravatar_id":"","url":"https://api.github.com/users/david-casagrande","html_url":"https://github.com/david-casagrande","followers_url":"https://api.github.com/users/david-casagrande/followers","following_url":"https://api.github.com/users/david-casagrande/following{/other_user}","gists_url":"https://api.github.com/users/david-casagrande/gists{/gist_id}","starred_url":"https://api.github.com/users/david-casagrande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-casagrande/subscriptions","organizations_url":"https://api.github.com/users/david-casagrande/orgs","repos_url":"https://api.github.com/users/david-casagrande/repos","events_url":"https://api.github.com/users/david-casagrande/events{/privacy}","received_events_url":"https://api.github.com/users/david-casagrande/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-07T19:25:02Z","updated_at":"2015-10-07T19:41:38Z","closed_at":"2015-10-07T19:41:38Z","body":"this is obviously only relevant in testing and i haven't tested another stubbing library other than sinon.\r\n\r\nexample:\r\n```js\r\n//class\r\nexport default ApplicationSerializer.extend({\r\n  modelNameFromPayloadKey: function(key) {\r\n    //manipulate key code\r\n    return this._super(key);\r\n  }\r\n});\r\n\r\n//test\r\ntest('#modelNameFromPayloadKey', function(assert) {\r\n  var serializer = this.subject();\r\n  var _superSpy = sinon.spy(serializer, '_super');\r\n\r\n  serializer.modelNameFromPayloadKey('user');\r\n  assert.equal(_superSpy.calledWith('user'), true, 'given user it passes user to `_super`);\r\n});\r\n```\r\ni understand this example is a little awkward because you can run the assertion on what is returned from `modelNameFromPayload`, but I have a couple other instances where you Il manipulate an argument and confirm that the manipulation is correct and not what is actually happening after you call `_super`\r\n\r\nas an additional bonus i have a mixin that has a method that call `_super`, that does works as expected if it's used in an `Ember.Object` that does not have the super method "}}