{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/30632767","id":30632767,"diff_hunk":"@@ -898,7 +898,7 @@ For more information on routing assertions available in Rails, see the API docum\n Testing Views\n -------------\n \n-Testing the response to your request by asserting the presence of key HTML elements and their content is a common way to test the views of your application. The `assert_select` method allows you to query HTML elements of the response by using a simple yet powerful syntax.\n+Testing the response to your request by asserting the presence of key HTML elements and their content is a common way to test the views of your application. Like route tests, view tests reside in `test/controllers/` or are part of controller tests. The `assert_select` method allows you to query HTML elements of the response by using a simple yet powerful syntax.","path":"guides/source/testing.md","position":5,"original_position":5,"commit_id":"d5847f4cc01fc2fbea20a6fef5d45d4863476f4b","original_commit_id":"d5847f4cc01fc2fbea20a6fef5d45d4863476f4b","user":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"body":"They reside in `test/views/`","created_at":"2015-05-19T18:48:22Z","updated_at":"2015-05-19T18:48:22Z","html_url":"https://github.com/rails/rails/pull/20157#discussion_r30632767","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/20157","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/30632767"},"html":{"href":"https://github.com/rails/rails/pull/20157#discussion_r30632767"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/20157"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/20157","id":35435494,"html_url":"https://github.com/rails/rails/pull/20157","diff_url":"https://github.com/rails/rails/pull/20157.diff","patch_url":"https://github.com/rails/rails/pull/20157.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/20157","number":20157,"state":"open","locked":false,"title":"Clarify view tests","user":{"login":"tak1n","id":675705,"avatar_url":"https://avatars.githubusercontent.com/u/675705?v=3","gravatar_id":"","url":"https://api.github.com/users/tak1n","html_url":"https://github.com/tak1n","followers_url":"https://api.github.com/users/tak1n/followers","following_url":"https://api.github.com/users/tak1n/following{/other_user}","gists_url":"https://api.github.com/users/tak1n/gists{/gist_id}","starred_url":"https://api.github.com/users/tak1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tak1n/subscriptions","organizations_url":"https://api.github.com/users/tak1n/orgs","repos_url":"https://api.github.com/users/tak1n/repos","events_url":"https://api.github.com/users/tak1n/events{/privacy}","received_events_url":"https://api.github.com/users/tak1n/received_events","type":"User","site_admin":false},"body":"In http://edgeguides.rubyonrails.org/testing.html#testing-views the assertions for testing views are explained. In http://edgeguides.rubyonrails.org/testing.html#testing-routes the file path and the test case which the test class should extend from are given.\r\n\r\nHowever view testing is a seperate chapter (6) like route testing. But unlike in the route testing chapter no hint is given that the view testing is also part of the controller tests, therefore a new rails user could be confused where those view tests would live.\r\n\r\nThanks :heart: :heart:","created_at":"2015-05-14T16:07:34Z","updated_at":"2015-05-19T18:48:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ec31538ddc08de534772a1d79ff60590971302f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/20157/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/20157/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/20157/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/d5847f4cc01fc2fbea20a6fef5d45d4863476f4b","head":{"label":"tak1n:master","ref":"master","sha":"d5847f4cc01fc2fbea20a6fef5d45d4863476f4b","user":{"login":"tak1n","id":675705,"avatar_url":"https://avatars.githubusercontent.com/u/675705?v=3","gravatar_id":"","url":"https://api.github.com/users/tak1n","html_url":"https://github.com/tak1n","followers_url":"https://api.github.com/users/tak1n/followers","following_url":"https://api.github.com/users/tak1n/following{/other_user}","gists_url":"https://api.github.com/users/tak1n/gists{/gist_id}","starred_url":"https://api.github.com/users/tak1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tak1n/subscriptions","organizations_url":"https://api.github.com/users/tak1n/orgs","repos_url":"https://api.github.com/users/tak1n/repos","events_url":"https://api.github.com/users/tak1n/events{/privacy}","received_events_url":"https://api.github.com/users/tak1n/received_events","type":"User","site_admin":false},"repo":{"id":35617572,"name":"rails","full_name":"tak1n/rails","owner":{"login":"tak1n","id":675705,"avatar_url":"https://avatars.githubusercontent.com/u/675705?v=3","gravatar_id":"","url":"https://api.github.com/users/tak1n","html_url":"https://github.com/tak1n","followers_url":"https://api.github.com/users/tak1n/followers","following_url":"https://api.github.com/users/tak1n/following{/other_user}","gists_url":"https://api.github.com/users/tak1n/gists{/gist_id}","starred_url":"https://api.github.com/users/tak1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tak1n/subscriptions","organizations_url":"https://api.github.com/users/tak1n/orgs","repos_url":"https://api.github.com/users/tak1n/repos","events_url":"https://api.github.com/users/tak1n/events{/privacy}","received_events_url":"https://api.github.com/users/tak1n/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tak1n/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/tak1n/rails","forks_url":"https://api.github.com/repos/tak1n/rails/forks","keys_url":"https://api.github.com/repos/tak1n/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tak1n/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tak1n/rails/teams","hooks_url":"https://api.github.com/repos/tak1n/rails/hooks","issue_events_url":"https://api.github.com/repos/tak1n/rails/issues/events{/number}","events_url":"https://api.github.com/repos/tak1n/rails/events","assignees_url":"https://api.github.com/repos/tak1n/rails/assignees{/user}","branches_url":"https://api.github.com/repos/tak1n/rails/branches{/branch}","tags_url":"https://api.github.com/repos/tak1n/rails/tags","blobs_url":"https://api.github.com/repos/tak1n/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tak1n/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tak1n/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/tak1n/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tak1n/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/tak1n/rails/languages","stargazers_url":"https://api.github.com/repos/tak1n/rails/stargazers","contributors_url":"https://api.github.com/repos/tak1n/rails/contributors","subscribers_url":"https://api.github.com/repos/tak1n/rails/subscribers","subscription_url":"https://api.github.com/repos/tak1n/rails/subscription","commits_url":"https://api.github.com/repos/tak1n/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/tak1n/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/tak1n/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/tak1n/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/tak1n/rails/contents/{+path}","compare_url":"https://api.github.com/repos/tak1n/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tak1n/rails/merges","archive_url":"https://api.github.com/repos/tak1n/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tak1n/rails/downloads","issues_url":"https://api.github.com/repos/tak1n/rails/issues{/number}","pulls_url":"https://api.github.com/repos/tak1n/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/tak1n/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/tak1n/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tak1n/rails/labels{/name}","releases_url":"https://api.github.com/repos/tak1n/rails/releases{/id}","created_at":"2015-05-14T15:00:37Z","updated_at":"2015-05-14T15:01:04Z","pushed_at":"2015-05-14T16:05:38Z","git_url":"git://github.com/tak1n/rails.git","ssh_url":"git@github.com:tak1n/rails.git","clone_url":"https://github.com/tak1n/rails.git","svn_url":"https://github.com/tak1n/rails","homepage":"http://rubyonrails.org","size":142613,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"rails:master","ref":"master","sha":"22ae4493a3a09ab223f22893b1badff97bc405ee","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","created_at":"2008-04-11T02:19:47Z","updated_at":"2015-05-19T17:25:16Z","pushed_at":"2015-05-19T18:40:47Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":435961,"stargazers_count":26158,"watchers_count":26158,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10379,"mirror_url":null,"open_issues_count":792,"forks":10379,"open_issues":792,"watchers":26158,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/20157"},"html":{"href":"https://github.com/rails/rails/pull/20157"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/20157"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/20157/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/20157/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/20157/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/d5847f4cc01fc2fbea20a6fef5d45d4863476f4b"}}}}