{"action":"created","issue":{"url":"https://api.github.com/repos/switchfly/ember-test-helpers/issues/27","labels_url":"https://api.github.com/repos/switchfly/ember-test-helpers/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/switchfly/ember-test-helpers/issues/27/comments","events_url":"https://api.github.com/repos/switchfly/ember-test-helpers/issues/27/events","html_url":"https://github.com/switchfly/ember-test-helpers/pull/27","id":62445475,"number":27,"title":"[breaking] Remove `view.$()` call in `render()` of module for component","user":{"login":"bantic","id":2023,"avatar_url":"https://avatars.githubusercontent.com/u/2023?v=3","gravatar_id":"","url":"https://api.github.com/users/bantic","html_url":"https://github.com/bantic","followers_url":"https://api.github.com/users/bantic/followers","following_url":"https://api.github.com/users/bantic/following{/other_user}","gists_url":"https://api.github.com/users/bantic/gists{/gist_id}","starred_url":"https://api.github.com/users/bantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bantic/subscriptions","organizations_url":"https://api.github.com/users/bantic/orgs","repos_url":"https://api.github.com/users/bantic/repos","events_url":"https://api.github.com/users/bantic/events{/privacy}","received_events_url":"https://api.github.com/users/bantic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-17T16:23:26Z","updated_at":"2015-03-17T18:03:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/switchfly/ember-test-helpers/pulls/27","html_url":"https://github.com/switchfly/ember-test-helpers/pull/27","diff_url":"https://github.com/switchfly/ember-test-helpers/pull/27.diff","patch_url":"https://github.com/switchfly/ember-test-helpers/pull/27.patch"},"body":"from #26 \r\n\r\nThis PR makes two changes:\r\n\r\n  * use a `cachedCalls` object internally in TestModule to track whether a given callback has been called. Previously, the code only did a check on the result (in `this.cache[key]`), which means that a callback that returns a falsy value will (incorrectly, it seems) be called multiple times. This seemed likely to result in inconsistent behavior. (This change is necessary for the following change)\r\n  * change `this.callbacks.render` to *not* return anything. It simply renders the component. This is a _breaking change_. Previously, `render` would return the rendered view's `this.$()` method, but this is problematic because there are cases where a view's `$()` method should not be called. Specifically, in Ember 1.11.0.beta-5, calling `this.$()` on a tagless component (where `tagName = ''`) will result in a failed assertion: [\"You cannot access this.$() on a component with `tagName: \\'\\'` specified.\"](https://github.com/emberjs/ember.js/blob/06e41ad7ccd28558dd4e651aa070bc06f7757821/packages/ember-views/lib/views/view.js#L943-L946), making it difficult-to-impossible to test such a component in a unit test. \r\n\r\nTest users can still call `this.$()` to get the jquery-wrapped element (in cases where that makes sense — if the component is tagless they will still get the failed assert mentioned above)\r\n\r\ncc @rwjblue @mixonic"},"comment":{"url":"https://api.github.com/repos/switchfly/ember-test-helpers/issues/comments/82502070","html_url":"https://github.com/switchfly/ember-test-helpers/pull/27#issuecomment-82502070","issue_url":"https://api.github.com/repos/switchfly/ember-test-helpers/issues/27","id":82502070,"user":{"login":"bantic","id":2023,"avatar_url":"https://avatars.githubusercontent.com/u/2023?v=3","gravatar_id":"","url":"https://api.github.com/users/bantic","html_url":"https://github.com/bantic","followers_url":"https://api.github.com/users/bantic/followers","following_url":"https://api.github.com/users/bantic/following{/other_user}","gists_url":"https://api.github.com/users/bantic/gists{/gist_id}","starred_url":"https://api.github.com/users/bantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bantic/subscriptions","organizations_url":"https://api.github.com/users/bantic/orgs","repos_url":"https://api.github.com/users/bantic/repos","events_url":"https://api.github.com/users/bantic/events{/privacy}","received_events_url":"https://api.github.com/users/bantic/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T18:03:53Z","updated_at":"2015-03-17T18:03:53Z","body":"@mixonic coming up..."}}