{"action":"created","comment":{"url":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls/comments/32655010","id":32655010,"diff_hunk":"@@ -1,3 +1,65 @@\n module.exports = {\n-  description: 'Generates a component unit test.'\n+  description: 'Generates a component test.',\n+\n+  availableOptions: [\n+    {\n+      name: 'integration',\n+      type: Boolean,\n+      default: false,\n+      aliases: ['i']\n+    }\n+  ],\n+\n+  locals: function(options) {\n+    var prefix, testOpts, defaultTest;\n+    if (options.integration) {\n+      prefix = 'Integration: ';\n+      testOpts = 'integration: true';\n+      defaultTest = \"// renders the component on the page\\n\" +\n+             \"       this.render('{{\" + options.entity.name+ \"}}');\\n\" +\n+             \"       expect(this.$()).to.be.ok;\";\n+    } else {\n+      prefix = '';\n+      testOpts = \"// specify the other units that are required for this test\\n\" +\n+             \"    // needs: ['component:foo', 'helper:bar']\";\n+      defaultTest = \"// creates the component instance\\n\" +\n+              \"      var component = this.subject();\\n\" +\n+              \"      expect(component._state).to.equal('preRender');\\n\\n\" +\n+              \"      // renders the component on the page\\n\" +\n+              \"      this.render();\\n\" +\n+              \"      expect(component._state).to.equal('inDOM');\";\n+    }\n+\n+    return {\n+      testPrefix: prefix,\n+      testOpts: testOpts,\n+      defaultTest: defaultTest,\n+      integration: options.integration\n+    };\n+  },\n+\n+  fileMapTokens: function(options) {\n+    return {\n+      __testfolder__: function(options) {\n+        if (options.locals.integration) {\n+          return 'integration';\n+        } else {\n+          return 'unit';\n+        }\n+      }\n+    };\n+  },\n+\n+  afterInstall: function(options) {\n+    if (!options.integration) { return; }\n+\n+    return this.insertIntoFile(\n+      'Brocfile.js',\n+      \"// This is necessary because of component integration test.\\n\" +\n+      \"app.import({\\n\" +\n+      \"  test: app.bowerDirectory + '/ember/ember-template-compiler.js'\\n\" +","path":"blueprints/component-test/index.js","position":61,"original_position":61,"commit_id":"73008847612d373596a6dbc40b9171511337720a","original_commit_id":"73008847612d373596a6dbc40b9171511337720a","user":{"login":"LevelbossMike","id":242299,"avatar_url":"https://avatars.githubusercontent.com/u/242299?v=3","gravatar_id":"","url":"https://api.github.com/users/LevelbossMike","html_url":"https://github.com/LevelbossMike","followers_url":"https://api.github.com/users/LevelbossMike/followers","following_url":"https://api.github.com/users/LevelbossMike/following{/other_user}","gists_url":"https://api.github.com/users/LevelbossMike/gists{/gist_id}","starred_url":"https://api.github.com/users/LevelbossMike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LevelbossMike/subscriptions","organizations_url":"https://api.github.com/users/LevelbossMike/orgs","repos_url":"https://api.github.com/users/LevelbossMike/repos","events_url":"https://api.github.com/users/LevelbossMike/events{/privacy}","received_events_url":"https://api.github.com/users/LevelbossMike/received_events","type":"User","site_admin":false},"body":"@pangratz @blimmer I haven't solved the jshint error. the only way I was able to get it pass jshint was to ignore the error.","created_at":"2015-06-17T17:56:08Z","updated_at":"2015-06-17T17:56:08Z","html_url":"https://github.com/switchfly/ember-cli-mocha/pull/57#discussion_r32655010","pull_request_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls/comments/32655010"},"html":{"href":"https://github.com/switchfly/ember-cli-mocha/pull/57#discussion_r32655010"},"pull_request":{"href":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls/57","id":37865206,"html_url":"https://github.com/switchfly/ember-cli-mocha/pull/57","diff_url":"https://github.com/switchfly/ember-cli-mocha/pull/57.diff","patch_url":"https://github.com/switchfly/ember-cli-mocha/pull/57.patch","issue_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/issues/57","number":57,"state":"open","locked":false,"title":"Allow generation of a component integration test.","user":{"login":"blimmer","id":630449,"avatar_url":"https://avatars.githubusercontent.com/u/630449?v=3","gravatar_id":"","url":"https://api.github.com/users/blimmer","html_url":"https://github.com/blimmer","followers_url":"https://api.github.com/users/blimmer/followers","following_url":"https://api.github.com/users/blimmer/following{/other_user}","gists_url":"https://api.github.com/users/blimmer/gists{/gist_id}","starred_url":"https://api.github.com/users/blimmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blimmer/subscriptions","organizations_url":"https://api.github.com/users/blimmer/orgs","repos_url":"https://api.github.com/users/blimmer/repos","events_url":"https://api.github.com/users/blimmer/events{/privacy}","received_events_url":"https://api.github.com/users/blimmer/received_events","type":"User","site_admin":false},"body":"Component integration tests are great, but they are difficult to figure out how to generate by default.\r\n\r\nI had a few goals with this new blueprint:\r\n* do not affect default behavior for component test generation\r\n* allow having both unit and integration tests for a component\r\n* automatically import the template compiler for tests if one or more component integration tests exists  \r\n  side note: this isn't ideal, but is the way to handle it for now. there's an [open issue](https://github.com/ember-cli/ember-cli/issues/3497) seeking a better way to do this.","created_at":"2015-06-17T04:39:58Z","updated_at":"2015-06-17T17:56:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a42dba9f7c0c04e892e6be730f0bca6e6c7a7e22","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls/57/commits","review_comments_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls/57/comments","review_comment_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/issues/57/comments","statuses_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/statuses/73008847612d373596a6dbc40b9171511337720a","head":{"label":"blimmer:component-integration-test-blueprint","ref":"component-integration-test-blueprint","sha":"73008847612d373596a6dbc40b9171511337720a","user":{"login":"blimmer","id":630449,"avatar_url":"https://avatars.githubusercontent.com/u/630449?v=3","gravatar_id":"","url":"https://api.github.com/users/blimmer","html_url":"https://github.com/blimmer","followers_url":"https://api.github.com/users/blimmer/followers","following_url":"https://api.github.com/users/blimmer/following{/other_user}","gists_url":"https://api.github.com/users/blimmer/gists{/gist_id}","starred_url":"https://api.github.com/users/blimmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blimmer/subscriptions","organizations_url":"https://api.github.com/users/blimmer/orgs","repos_url":"https://api.github.com/users/blimmer/repos","events_url":"https://api.github.com/users/blimmer/events{/privacy}","received_events_url":"https://api.github.com/users/blimmer/received_events","type":"User","site_admin":false},"repo":{"id":37568889,"name":"ember-cli-mocha","full_name":"blimmer/ember-cli-mocha","owner":{"login":"blimmer","id":630449,"avatar_url":"https://avatars.githubusercontent.com/u/630449?v=3","gravatar_id":"","url":"https://api.github.com/users/blimmer","html_url":"https://github.com/blimmer","followers_url":"https://api.github.com/users/blimmer/followers","following_url":"https://api.github.com/users/blimmer/following{/other_user}","gists_url":"https://api.github.com/users/blimmer/gists{/gist_id}","starred_url":"https://api.github.com/users/blimmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blimmer/subscriptions","organizations_url":"https://api.github.com/users/blimmer/orgs","repos_url":"https://api.github.com/users/blimmer/repos","events_url":"https://api.github.com/users/blimmer/events{/privacy}","received_events_url":"https://api.github.com/users/blimmer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blimmer/ember-cli-mocha","description":"Mocha and Chai tests for ember-cli applications","fork":true,"url":"https://api.github.com/repos/blimmer/ember-cli-mocha","forks_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/forks","keys_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/teams","hooks_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/hooks","issue_events_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/issues/events{/number}","events_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/events","assignees_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/assignees{/user}","branches_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/branches{/branch}","tags_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/tags","blobs_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/git/refs{/sha}","trees_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/statuses/{sha}","languages_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/languages","stargazers_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/stargazers","contributors_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/contributors","subscribers_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/subscribers","subscription_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/subscription","commits_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/commits{/sha}","git_commits_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/git/commits{/sha}","comments_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/comments{/number}","issue_comment_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/issues/comments{/number}","contents_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/contents/{+path}","compare_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/merges","archive_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/downloads","issues_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/issues{/number}","pulls_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/pulls{/number}","milestones_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/milestones{/number}","notifications_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/labels{/name}","releases_url":"https://api.github.com/repos/blimmer/ember-cli-mocha/releases{/id}","created_at":"2015-06-17T02:51:24Z","updated_at":"2015-06-17T02:51:24Z","pushed_at":"2015-06-17T04:35:36Z","git_url":"git://github.com/blimmer/ember-cli-mocha.git","ssh_url":"git@github.com:blimmer/ember-cli-mocha.git","clone_url":"https://github.com/blimmer/ember-cli-mocha.git","svn_url":"https://github.com/blimmer/ember-cli-mocha","homepage":"","size":144,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"switchfly:master","ref":"master","sha":"0b4503e5322704bbe976ba9ff4ddd9da38e2c1aa","user":{"login":"switchfly","id":2251691,"avatar_url":"https://avatars.githubusercontent.com/u/2251691?v=3","gravatar_id":"","url":"https://api.github.com/users/switchfly","html_url":"https://github.com/switchfly","followers_url":"https://api.github.com/users/switchfly/followers","following_url":"https://api.github.com/users/switchfly/following{/other_user}","gists_url":"https://api.github.com/users/switchfly/gists{/gist_id}","starred_url":"https://api.github.com/users/switchfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/switchfly/subscriptions","organizations_url":"https://api.github.com/users/switchfly/orgs","repos_url":"https://api.github.com/users/switchfly/repos","events_url":"https://api.github.com/users/switchfly/events{/privacy}","received_events_url":"https://api.github.com/users/switchfly/received_events","type":"Organization","site_admin":false},"repo":{"id":26506083,"name":"ember-cli-mocha","full_name":"switchfly/ember-cli-mocha","owner":{"login":"switchfly","id":2251691,"avatar_url":"https://avatars.githubusercontent.com/u/2251691?v=3","gravatar_id":"","url":"https://api.github.com/users/switchfly","html_url":"https://github.com/switchfly","followers_url":"https://api.github.com/users/switchfly/followers","following_url":"https://api.github.com/users/switchfly/following{/other_user}","gists_url":"https://api.github.com/users/switchfly/gists{/gist_id}","starred_url":"https://api.github.com/users/switchfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/switchfly/subscriptions","organizations_url":"https://api.github.com/users/switchfly/orgs","repos_url":"https://api.github.com/users/switchfly/repos","events_url":"https://api.github.com/users/switchfly/events{/privacy}","received_events_url":"https://api.github.com/users/switchfly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/switchfly/ember-cli-mocha","description":"Mocha and Chai tests for ember-cli applications","fork":false,"url":"https://api.github.com/repos/switchfly/ember-cli-mocha","forks_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/forks","keys_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/teams","hooks_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/hooks","issue_events_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/issues/events{/number}","events_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/events","assignees_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/assignees{/user}","branches_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/branches{/branch}","tags_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/tags","blobs_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/git/refs{/sha}","trees_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/statuses/{sha}","languages_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/languages","stargazers_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/stargazers","contributors_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/contributors","subscribers_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/subscribers","subscription_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/subscription","commits_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/commits{/sha}","git_commits_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/git/commits{/sha}","comments_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/comments{/number}","issue_comment_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/issues/comments{/number}","contents_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/contents/{+path}","compare_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/merges","archive_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/downloads","issues_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/issues{/number}","pulls_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls{/number}","milestones_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/milestones{/number}","notifications_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/labels{/name}","releases_url":"https://api.github.com/repos/switchfly/ember-cli-mocha/releases{/id}","created_at":"2014-11-11T21:41:08Z","updated_at":"2015-06-01T03:56:43Z","pushed_at":"2015-06-17T11:43:49Z","git_url":"git://github.com/switchfly/ember-cli-mocha.git","ssh_url":"git@github.com:switchfly/ember-cli-mocha.git","clone_url":"https://github.com/switchfly/ember-cli-mocha.git","svn_url":"https://github.com/switchfly/ember-cli-mocha","homepage":"","size":461,"stargazers_count":91,"watchers_count":91,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":5,"forks":24,"open_issues":5,"watchers":91,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls/57"},"html":{"href":"https://github.com/switchfly/ember-cli-mocha/pull/57"},"issue":{"href":"https://api.github.com/repos/switchfly/ember-cli-mocha/issues/57"},"comments":{"href":"https://api.github.com/repos/switchfly/ember-cli-mocha/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/switchfly/ember-cli-mocha/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/switchfly/ember-cli-mocha/statuses/73008847612d373596a6dbc40b9171511337720a"}}}}