{"action":"created","comment":{"url":"https://api.github.com/repos/shved/qna/pulls/comments/32384943","id":32384943,"diff_hunk":"@@ -2,63 +2,67 @@\n \n RSpec.describe AnswersController, type: :controller do\n   let(:user) { create(:user) }\n-  let!(:question) { create(:question, user: user) }\n-  let!(:answer) { create(:answer, question: question, user: user) }\n+  let(:question) { create(:question, user: user) }\n+  let(:answer) { create(:answer, question: question, user: user) }\n   let!(:other_answer) { create(:answer, question: question) }\n \n+  # answer creation response made with pure websocket publishing\n+\n   describe 'POST # create' do\n     sign_in_user\n \n     context 'with valid attributes' do\n       it 'saves the new answer in the database' do\n         expect { post :create, question_id: question, answer: attributes_for(:answer), format: :js }\n-               .to change(question.answers, :count).by(1)\n-      end\n-\n-      it 'render create template' do\n-        post :create, question_id: question, answer: attributes_for(:answer), format: :js\n-        expect(response).to render_template 'create'\n+          .to change(question.answers, :count).by(1)\n       end\n     end\n \n     context 'with invalid attributes' do\n       it 'does not save the answer' do\n-        expect { post :create, question_id: question, answer: attributes_for(:invalid_answer), format: :js }\n-               .to_not change(Answer, :count)\n-      end\n-\n-      it 'render create template' do\n-        post :create, question_id: question, answer: attributes_for(:invalid_answer), format: :js\n-        expect(response).to render_template 'create'\n+        expect {\n+          post :create,","path":"spec/controllers/answers_controller_spec.rb","position":38,"original_position":38,"commit_id":"2d174f9c16207dcdd6cb08cabc8715376347e533","original_commit_id":"2d174f9c16207dcdd6cb08cabc8715376347e533","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Use 2 (not 0) spaces for indentation.","created_at":"2015-06-14T22:09:04Z","updated_at":"2015-06-14T22:09:04Z","html_url":"https://github.com/shved/qna/pull/23#discussion_r32384943","pull_request_url":"https://api.github.com/repos/shved/qna/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/shved/qna/pulls/comments/32384943"},"html":{"href":"https://github.com/shved/qna/pull/23#discussion_r32384943"},"pull_request":{"href":"https://api.github.com/repos/shved/qna/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/shved/qna/pulls/23","id":37648920,"html_url":"https://github.com/shved/qna/pull/23","diff_url":"https://github.com/shved/qna/pull/23.diff","patch_url":"https://github.com/shved/qna/pull/23.patch","issue_url":"https://api.github.com/repos/shved/qna/issues/23","number":23,"state":"open","locked":false,"title":"Unit11","user":{"login":"shved","id":321163,"avatar_url":"https://avatars.githubusercontent.com/u/321163?v=3","gravatar_id":"","url":"https://api.github.com/users/shved","html_url":"https://github.com/shved","followers_url":"https://api.github.com/users/shved/followers","following_url":"https://api.github.com/users/shved/following{/other_user}","gists_url":"https://api.github.com/users/shved/gists{/gist_id}","starred_url":"https://api.github.com/users/shved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shved/subscriptions","organizations_url":"https://api.github.com/users/shved/orgs","repos_url":"https://api.github.com/users/shved/repos","events_url":"https://api.github.com/users/shved/events{/privacy}","received_events_url":"https://api.github.com/users/shved/received_events","type":"User","site_admin":false},"body":"Переписал все контроллеры на респондерс. Местами получилось как-то коряво, но вроде все приемлемо сделал. ","created_at":"2015-06-14T21:37:01Z","updated_at":"2015-06-14T22:09:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"003fb25b2459d6f1ecb540847daafc0eec823233","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/shved/qna/pulls/23/commits","review_comments_url":"https://api.github.com/repos/shved/qna/pulls/23/comments","review_comment_url":"https://api.github.com/repos/shved/qna/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shved/qna/issues/23/comments","statuses_url":"https://api.github.com/repos/shved/qna/statuses/2d174f9c16207dcdd6cb08cabc8715376347e533","head":{"label":"shved:unit11","ref":"unit11","sha":"2d174f9c16207dcdd6cb08cabc8715376347e533","user":{"login":"shved","id":321163,"avatar_url":"https://avatars.githubusercontent.com/u/321163?v=3","gravatar_id":"","url":"https://api.github.com/users/shved","html_url":"https://github.com/shved","followers_url":"https://api.github.com/users/shved/followers","following_url":"https://api.github.com/users/shved/following{/other_user}","gists_url":"https://api.github.com/users/shved/gists{/gist_id}","starred_url":"https://api.github.com/users/shved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shved/subscriptions","organizations_url":"https://api.github.com/users/shved/orgs","repos_url":"https://api.github.com/users/shved/repos","events_url":"https://api.github.com/users/shved/events{/privacy}","received_events_url":"https://api.github.com/users/shved/received_events","type":"User","site_admin":false},"repo":{"id":31972290,"name":"qna","full_name":"shved/qna","owner":{"login":"shved","id":321163,"avatar_url":"https://avatars.githubusercontent.com/u/321163?v=3","gravatar_id":"","url":"https://api.github.com/users/shved","html_url":"https://github.com/shved","followers_url":"https://api.github.com/users/shved/followers","following_url":"https://api.github.com/users/shved/following{/other_user}","gists_url":"https://api.github.com/users/shved/gists{/gist_id}","starred_url":"https://api.github.com/users/shved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shved/subscriptions","organizations_url":"https://api.github.com/users/shved/orgs","repos_url":"https://api.github.com/users/shved/repos","events_url":"https://api.github.com/users/shved/events{/privacy}","received_events_url":"https://api.github.com/users/shved/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shved/qna","description":"Учебный проект Thinknetica","fork":false,"url":"https://api.github.com/repos/shved/qna","forks_url":"https://api.github.com/repos/shved/qna/forks","keys_url":"https://api.github.com/repos/shved/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shved/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shved/qna/teams","hooks_url":"https://api.github.com/repos/shved/qna/hooks","issue_events_url":"https://api.github.com/repos/shved/qna/issues/events{/number}","events_url":"https://api.github.com/repos/shved/qna/events","assignees_url":"https://api.github.com/repos/shved/qna/assignees{/user}","branches_url":"https://api.github.com/repos/shved/qna/branches{/branch}","tags_url":"https://api.github.com/repos/shved/qna/tags","blobs_url":"https://api.github.com/repos/shved/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shved/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shved/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/shved/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shved/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/shved/qna/languages","stargazers_url":"https://api.github.com/repos/shved/qna/stargazers","contributors_url":"https://api.github.com/repos/shved/qna/contributors","subscribers_url":"https://api.github.com/repos/shved/qna/subscribers","subscription_url":"https://api.github.com/repos/shved/qna/subscription","commits_url":"https://api.github.com/repos/shved/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/shved/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/shved/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/shved/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/shved/qna/contents/{+path}","compare_url":"https://api.github.com/repos/shved/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shved/qna/merges","archive_url":"https://api.github.com/repos/shved/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shved/qna/downloads","issues_url":"https://api.github.com/repos/shved/qna/issues{/number}","pulls_url":"https://api.github.com/repos/shved/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/shved/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/shved/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shved/qna/labels{/name}","releases_url":"https://api.github.com/repos/shved/qna/releases{/id}","created_at":"2015-03-10T17:44:42Z","updated_at":"2015-04-24T08:18:52Z","pushed_at":"2015-06-14T22:08:57Z","git_url":"git://github.com/shved/qna.git","ssh_url":"git@github.com:shved/qna.git","clone_url":"https://github.com/shved/qna.git","svn_url":"https://github.com/shved/qna","homepage":null,"size":704,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":0,"default_branch":"master"}},"base":{"label":"shved:master","ref":"master","sha":"d0070e3c35b1b7a5c78c02fc9931e819885eefd4","user":{"login":"shved","id":321163,"avatar_url":"https://avatars.githubusercontent.com/u/321163?v=3","gravatar_id":"","url":"https://api.github.com/users/shved","html_url":"https://github.com/shved","followers_url":"https://api.github.com/users/shved/followers","following_url":"https://api.github.com/users/shved/following{/other_user}","gists_url":"https://api.github.com/users/shved/gists{/gist_id}","starred_url":"https://api.github.com/users/shved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shved/subscriptions","organizations_url":"https://api.github.com/users/shved/orgs","repos_url":"https://api.github.com/users/shved/repos","events_url":"https://api.github.com/users/shved/events{/privacy}","received_events_url":"https://api.github.com/users/shved/received_events","type":"User","site_admin":false},"repo":{"id":31972290,"name":"qna","full_name":"shved/qna","owner":{"login":"shved","id":321163,"avatar_url":"https://avatars.githubusercontent.com/u/321163?v=3","gravatar_id":"","url":"https://api.github.com/users/shved","html_url":"https://github.com/shved","followers_url":"https://api.github.com/users/shved/followers","following_url":"https://api.github.com/users/shved/following{/other_user}","gists_url":"https://api.github.com/users/shved/gists{/gist_id}","starred_url":"https://api.github.com/users/shved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shved/subscriptions","organizations_url":"https://api.github.com/users/shved/orgs","repos_url":"https://api.github.com/users/shved/repos","events_url":"https://api.github.com/users/shved/events{/privacy}","received_events_url":"https://api.github.com/users/shved/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shved/qna","description":"Учебный проект Thinknetica","fork":false,"url":"https://api.github.com/repos/shved/qna","forks_url":"https://api.github.com/repos/shved/qna/forks","keys_url":"https://api.github.com/repos/shved/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shved/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shved/qna/teams","hooks_url":"https://api.github.com/repos/shved/qna/hooks","issue_events_url":"https://api.github.com/repos/shved/qna/issues/events{/number}","events_url":"https://api.github.com/repos/shved/qna/events","assignees_url":"https://api.github.com/repos/shved/qna/assignees{/user}","branches_url":"https://api.github.com/repos/shved/qna/branches{/branch}","tags_url":"https://api.github.com/repos/shved/qna/tags","blobs_url":"https://api.github.com/repos/shved/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shved/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shved/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/shved/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shved/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/shved/qna/languages","stargazers_url":"https://api.github.com/repos/shved/qna/stargazers","contributors_url":"https://api.github.com/repos/shved/qna/contributors","subscribers_url":"https://api.github.com/repos/shved/qna/subscribers","subscription_url":"https://api.github.com/repos/shved/qna/subscription","commits_url":"https://api.github.com/repos/shved/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/shved/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/shved/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/shved/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/shved/qna/contents/{+path}","compare_url":"https://api.github.com/repos/shved/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shved/qna/merges","archive_url":"https://api.github.com/repos/shved/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shved/qna/downloads","issues_url":"https://api.github.com/repos/shved/qna/issues{/number}","pulls_url":"https://api.github.com/repos/shved/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/shved/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/shved/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shved/qna/labels{/name}","releases_url":"https://api.github.com/repos/shved/qna/releases{/id}","created_at":"2015-03-10T17:44:42Z","updated_at":"2015-04-24T08:18:52Z","pushed_at":"2015-06-14T22:08:57Z","git_url":"git://github.com/shved/qna.git","ssh_url":"git@github.com:shved/qna.git","clone_url":"https://github.com/shved/qna.git","svn_url":"https://github.com/shved/qna","homepage":null,"size":704,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shved/qna/pulls/23"},"html":{"href":"https://github.com/shved/qna/pull/23"},"issue":{"href":"https://api.github.com/repos/shved/qna/issues/23"},"comments":{"href":"https://api.github.com/repos/shved/qna/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/shved/qna/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/shved/qna/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shved/qna/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/shved/qna/statuses/2d174f9c16207dcdd6cb08cabc8715376347e533"}}}}