{"action":"created","comment":{"url":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls/comments/215003266","pull_request_review_id":152175053,"id":215003266,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTAwMzI2Ng==","diff_hunk":"@@ -110,8 +110,101 @@ it \"is invalid without a description\" do\n end\n ```\n \n+### Write your specs with performance in mind.","path":"styleguide/testing.md","position":13,"original_position":13,"commit_id":"f99d57e55ad9c1342c4f128647b5c993b0fb6baa","original_commit_id":"f99d57e55ad9c1342c4f128647b5c993b0fb6baa","user":{"login":"rreinhardt9","id":6023437,"node_id":"MDQ6VXNlcjYwMjM0Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6023437?v=4","gravatar_id":"","url":"https://api.github.com/users/rreinhardt9","html_url":"https://github.com/rreinhardt9","followers_url":"https://api.github.com/users/rreinhardt9/followers","following_url":"https://api.github.com/users/rreinhardt9/following{/other_user}","gists_url":"https://api.github.com/users/rreinhardt9/gists{/gist_id}","starred_url":"https://api.github.com/users/rreinhardt9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rreinhardt9/subscriptions","organizations_url":"https://api.github.com/users/rreinhardt9/orgs","repos_url":"https://api.github.com/users/rreinhardt9/repos","events_url":"https://api.github.com/users/rreinhardt9/events{/privacy}","received_events_url":"https://api.github.com/users/rreinhardt9/received_events","type":"User","site_admin":false},"body":"I think there is a potential to introduce a subtle flakiness here.\r\n\r\nLet's say for example, you have something that puts the text \"working\" on the page until it receive a response from the server. We want that to be gone before we move onto the next step.\r\nIf we write some thing like `expect(page.has_no_content?(\"working\")).to eq(true)` there is the possibility that because of how the timing works out, `page` at the point in time we check it here might still have \"working\" on it and so would fail (no waiting). If we use `expect(page).not_to have_content(\"working\")` and it happens that we catch the page before \"working\" disappears, it will wait until that becomes true or until we hit the capybara timeout. In that second case, we avoid a flake where maybe the test ran really fast and \"working\" was still on the page. Additionally, if we run `expect(page).not_to have_content(\"working\")` and it isn't on the page, it would pass right away; so I don't think there would be a time penalty in that case.\r\n\r\nThere is a link here that has some discussion around this https://robots.thoughtbot.com/write-reliable-asynchronous-integration-tests-with-capybara#looking-for-matching-css\r\n\r\nI may be missing the point you were making though; is there a scenario where the `expect().to eq(true)` made more sense?\r\n","created_at":"2018-09-04T17:35:44Z","updated_at":"2018-09-04T17:35:44Z","html_url":"https://github.com/lessonly/lessonly.github.io/pull/96#discussion_r215003266","pull_request_url":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls/96","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls/comments/215003266"},"html":{"href":"https://github.com/lessonly/lessonly.github.io/pull/96#discussion_r215003266"},"pull_request":{"href":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls/96"}},"in_reply_to_id":214366236},"pull_request":{"url":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls/96","id":204501262,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NTAxMjYy","html_url":"https://github.com/lessonly/lessonly.github.io/pull/96","diff_url":"https://github.com/lessonly/lessonly.github.io/pull/96.diff","patch_url":"https://github.com/lessonly/lessonly.github.io/pull/96.patch","issue_url":"https://api.github.com/repos/lessonly/lessonly.github.io/issues/96","number":96,"state":"open","locked":false,"title":"Add documentation around testing to style guide","user":{"login":"haleymnatz","id":22621824,"node_id":"MDQ6VXNlcjIyNjIxODI0","avatar_url":"https://avatars1.githubusercontent.com/u/22621824?v=4","gravatar_id":"","url":"https://api.github.com/users/haleymnatz","html_url":"https://github.com/haleymnatz","followers_url":"https://api.github.com/users/haleymnatz/followers","following_url":"https://api.github.com/users/haleymnatz/following{/other_user}","gists_url":"https://api.github.com/users/haleymnatz/gists{/gist_id}","starred_url":"https://api.github.com/users/haleymnatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haleymnatz/subscriptions","organizations_url":"https://api.github.com/users/haleymnatz/orgs","repos_url":"https://api.github.com/users/haleymnatz/repos","events_url":"https://api.github.com/users/haleymnatz/events{/privacy}","received_events_url":"https://api.github.com/users/haleymnatz/received_events","type":"User","site_admin":false},"body":"Resolves [[ch13791]](https://app.clubhouse.io/lessonly/story/13791)\r\n\r\nAdds helpful documentation to testing portion of style guide.\r\n\r\nSpecifically adds sections on:\r\n\r\n-  `request_setup` line in controller specs\r\n- includes _context `logged_in_as_[something`] for feature specs\r\n- Use of `specify` vs `it`\r\n- `and_call_original`\r\n- JS spec helpers in spec/support/javascript_helper.rb\r\n- writing performance based tests\r\n","created_at":"2018-07-27T18:04:17Z","updated_at":"2018-09-04T17:35:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f30f38f057582d531652a20af1c22daeba6cae5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls/96/commits","review_comments_url":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls/96/comments","review_comment_url":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lessonly/lessonly.github.io/issues/96/comments","statuses_url":"https://api.github.com/repos/lessonly/lessonly.github.io/statuses/f99d57e55ad9c1342c4f128647b5c993b0fb6baa","head":{"label":"lessonly:haleymnatz/ch13791/add-documentation-around-testing-to-style","ref":"haleymnatz/ch13791/add-documentation-around-testing-to-style","sha":"f99d57e55ad9c1342c4f128647b5c993b0fb6baa","user":{"login":"lessonly","id":8042410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgwNDI0MTA=","avatar_url":"https://avatars1.githubusercontent.com/u/8042410?v=4","gravatar_id":"","url":"https://api.github.com/users/lessonly","html_url":"https://github.com/lessonly","followers_url":"https://api.github.com/users/lessonly/followers","following_url":"https://api.github.com/users/lessonly/following{/other_user}","gists_url":"https://api.github.com/users/lessonly/gists{/gist_id}","starred_url":"https://api.github.com/users/lessonly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lessonly/subscriptions","organizations_url":"https://api.github.com/users/lessonly/orgs","repos_url":"https://api.github.com/users/lessonly/repos","events_url":"https://api.github.com/users/lessonly/events{/privacy}","received_events_url":"https://api.github.com/users/lessonly/received_events","type":"Organization","site_admin":false},"repo":{"id":31232893,"node_id":"MDEwOlJlcG9zaXRvcnkzMTIzMjg5Mw==","name":"lessonly.github.io","full_name":"lessonly/lessonly.github.io","owner":{"login":"lessonly","id":8042410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgwNDI0MTA=","avatar_url":"https://avatars1.githubusercontent.com/u/8042410?v=4","gravatar_id":"","url":"https://api.github.com/users/lessonly","html_url":"https://github.com/lessonly","followers_url":"https://api.github.com/users/lessonly/followers","following_url":"https://api.github.com/users/lessonly/following{/other_user}","gists_url":"https://api.github.com/users/lessonly/gists{/gist_id}","starred_url":"https://api.github.com/users/lessonly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lessonly/subscriptions","organizations_url":"https://api.github.com/users/lessonly/orgs","repos_url":"https://api.github.com/users/lessonly/repos","events_url":"https://api.github.com/users/lessonly/events{/privacy}","received_events_url":"https://api.github.com/users/lessonly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lessonly/lessonly.github.io","description":"Our coding style guide(s)!","fork":false,"url":"https://api.github.com/repos/lessonly/lessonly.github.io","forks_url":"https://api.github.com/repos/lessonly/lessonly.github.io/forks","keys_url":"https://api.github.com/repos/lessonly/lessonly.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lessonly/lessonly.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lessonly/lessonly.github.io/teams","hooks_url":"https://api.github.com/repos/lessonly/lessonly.github.io/hooks","issue_events_url":"https://api.github.com/repos/lessonly/lessonly.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/lessonly/lessonly.github.io/events","assignees_url":"https://api.github.com/repos/lessonly/lessonly.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/lessonly/lessonly.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/lessonly/lessonly.github.io/tags","blobs_url":"https://api.github.com/repos/lessonly/lessonly.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lessonly/lessonly.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lessonly/lessonly.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/lessonly/lessonly.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lessonly/lessonly.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/lessonly/lessonly.github.io/languages","stargazers_url":"https://api.github.com/repos/lessonly/lessonly.github.io/stargazers","contributors_url":"https://api.github.com/repos/lessonly/lessonly.github.io/contributors","subscribers_url":"https://api.github.com/repos/lessonly/lessonly.github.io/subscribers","subscription_url":"https://api.github.com/repos/lessonly/lessonly.github.io/subscription","commits_url":"https://api.github.com/repos/lessonly/lessonly.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/lessonly/lessonly.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/lessonly/lessonly.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/lessonly/lessonly.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/lessonly/lessonly.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/lessonly/lessonly.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lessonly/lessonly.github.io/merges","archive_url":"https://api.github.com/repos/lessonly/lessonly.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lessonly/lessonly.github.io/downloads","issues_url":"https://api.github.com/repos/lessonly/lessonly.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/lessonly/lessonly.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/lessonly/lessonly.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lessonly/lessonly.github.io/labels{/name}","releases_url":"https://api.github.com/repos/lessonly/lessonly.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/lessonly/lessonly.github.io/deployments","created_at":"2015-02-23T22:18:30Z","updated_at":"2018-07-20T20:23:59Z","pushed_at":"2018-08-29T18:43:56Z","git_url":"git://github.com/lessonly/lessonly.github.io.git","ssh_url":"git@github.com:lessonly/lessonly.github.io.git","clone_url":"https://github.com/lessonly/lessonly.github.io.git","svn_url":"https://github.com/lessonly/lessonly.github.io","homepage":"http://lessonly.github.io","size":239,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":35,"license":null,"forks":0,"open_issues":35,"watchers":0,"default_branch":"master"}},"base":{"label":"lessonly:master","ref":"master","sha":"2467dca0e1d3bb040c2439ffd3de08beb7f987bc","user":{"login":"lessonly","id":8042410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgwNDI0MTA=","avatar_url":"https://avatars1.githubusercontent.com/u/8042410?v=4","gravatar_id":"","url":"https://api.github.com/users/lessonly","html_url":"https://github.com/lessonly","followers_url":"https://api.github.com/users/lessonly/followers","following_url":"https://api.github.com/users/lessonly/following{/other_user}","gists_url":"https://api.github.com/users/lessonly/gists{/gist_id}","starred_url":"https://api.github.com/users/lessonly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lessonly/subscriptions","organizations_url":"https://api.github.com/users/lessonly/orgs","repos_url":"https://api.github.com/users/lessonly/repos","events_url":"https://api.github.com/users/lessonly/events{/privacy}","received_events_url":"https://api.github.com/users/lessonly/received_events","type":"Organization","site_admin":false},"repo":{"id":31232893,"node_id":"MDEwOlJlcG9zaXRvcnkzMTIzMjg5Mw==","name":"lessonly.github.io","full_name":"lessonly/lessonly.github.io","owner":{"login":"lessonly","id":8042410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgwNDI0MTA=","avatar_url":"https://avatars1.githubusercontent.com/u/8042410?v=4","gravatar_id":"","url":"https://api.github.com/users/lessonly","html_url":"https://github.com/lessonly","followers_url":"https://api.github.com/users/lessonly/followers","following_url":"https://api.github.com/users/lessonly/following{/other_user}","gists_url":"https://api.github.com/users/lessonly/gists{/gist_id}","starred_url":"https://api.github.com/users/lessonly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lessonly/subscriptions","organizations_url":"https://api.github.com/users/lessonly/orgs","repos_url":"https://api.github.com/users/lessonly/repos","events_url":"https://api.github.com/users/lessonly/events{/privacy}","received_events_url":"https://api.github.com/users/lessonly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lessonly/lessonly.github.io","description":"Our coding style guide(s)!","fork":false,"url":"https://api.github.com/repos/lessonly/lessonly.github.io","forks_url":"https://api.github.com/repos/lessonly/lessonly.github.io/forks","keys_url":"https://api.github.com/repos/lessonly/lessonly.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lessonly/lessonly.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lessonly/lessonly.github.io/teams","hooks_url":"https://api.github.com/repos/lessonly/lessonly.github.io/hooks","issue_events_url":"https://api.github.com/repos/lessonly/lessonly.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/lessonly/lessonly.github.io/events","assignees_url":"https://api.github.com/repos/lessonly/lessonly.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/lessonly/lessonly.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/lessonly/lessonly.github.io/tags","blobs_url":"https://api.github.com/repos/lessonly/lessonly.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lessonly/lessonly.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lessonly/lessonly.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/lessonly/lessonly.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lessonly/lessonly.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/lessonly/lessonly.github.io/languages","stargazers_url":"https://api.github.com/repos/lessonly/lessonly.github.io/stargazers","contributors_url":"https://api.github.com/repos/lessonly/lessonly.github.io/contributors","subscribers_url":"https://api.github.com/repos/lessonly/lessonly.github.io/subscribers","subscription_url":"https://api.github.com/repos/lessonly/lessonly.github.io/subscription","commits_url":"https://api.github.com/repos/lessonly/lessonly.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/lessonly/lessonly.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/lessonly/lessonly.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/lessonly/lessonly.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/lessonly/lessonly.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/lessonly/lessonly.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lessonly/lessonly.github.io/merges","archive_url":"https://api.github.com/repos/lessonly/lessonly.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lessonly/lessonly.github.io/downloads","issues_url":"https://api.github.com/repos/lessonly/lessonly.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/lessonly/lessonly.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/lessonly/lessonly.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lessonly/lessonly.github.io/labels{/name}","releases_url":"https://api.github.com/repos/lessonly/lessonly.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/lessonly/lessonly.github.io/deployments","created_at":"2015-02-23T22:18:30Z","updated_at":"2018-07-20T20:23:59Z","pushed_at":"2018-08-29T18:43:56Z","git_url":"git://github.com/lessonly/lessonly.github.io.git","ssh_url":"git@github.com:lessonly/lessonly.github.io.git","clone_url":"https://github.com/lessonly/lessonly.github.io.git","svn_url":"https://github.com/lessonly/lessonly.github.io","homepage":"http://lessonly.github.io","size":239,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":35,"license":null,"forks":0,"open_issues":35,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls/96"},"html":{"href":"https://github.com/lessonly/lessonly.github.io/pull/96"},"issue":{"href":"https://api.github.com/repos/lessonly/lessonly.github.io/issues/96"},"comments":{"href":"https://api.github.com/repos/lessonly/lessonly.github.io/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lessonly/lessonly.github.io/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/lessonly/lessonly.github.io/statuses/f99d57e55ad9c1342c4f128647b5c993b0fb6baa"}},"author_association":"NONE"}}
{"actor":{"display_login":"rreinhardt9"}}