{"action":"created","comment":{"url":"https://api.github.com/repos/oblaka/qna/pulls/comments/31789576","id":31789576,"diff_hunk":"@@ -0,0 +1,46 @@\n+require 'rails_helper'\n+\n+RSpec.describe AnswersController, type: :controller do\n+\n+  let(:answer) { create(:answer) }\n+\n+  describe 'POST #create' do\n+\n+    context 'with valid parameters' do\n+      it 'should save new answer in database' do\n+        answer","path":"spec/controllers/answers_controller_spec.rb","position":11,"original_position":11,"commit_id":"851f889bc65935da6d55462e525be3a76a8ce2a3","original_commit_id":"851f889bc65935da6d55462e525be3a76a8ce2a3","user":{"login":"palkan","id":1516722,"avatar_url":"https://avatars.githubusercontent.com/u/1516722?v=3","gravatar_id":"","url":"https://api.github.com/users/palkan","html_url":"https://github.com/palkan","followers_url":"https://api.github.com/users/palkan/followers","following_url":"https://api.github.com/users/palkan/following{/other_user}","gists_url":"https://api.github.com/users/palkan/gists{/gist_id}","starred_url":"https://api.github.com/users/palkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palkan/subscriptions","organizations_url":"https://api.github.com/users/palkan/orgs","repos_url":"https://api.github.com/users/palkan/repos","events_url":"https://api.github.com/users/palkan/events{/privacy}","received_events_url":"https://api.github.com/users/palkan/received_events","type":"User","site_admin":false},"body":"Для создания нам нужен только вопрос, а мы создаем ответ с вопросом.\r\nВ данном случае лучше сделать так:\r\n\r\n```ruby\r\ndescribe 'POST #create' do\r\n  let!(:question) { create(:question) }\r\n  ...\r\nend\r\n```","created_at":"2015-06-05T06:06:54Z","updated_at":"2015-06-05T06:06:54Z","html_url":"https://github.com/oblaka/qna/pull/2#discussion_r31789576","pull_request_url":"https://api.github.com/repos/oblaka/qna/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/oblaka/qna/pulls/comments/31789576"},"html":{"href":"https://github.com/oblaka/qna/pull/2#discussion_r31789576"},"pull_request":{"href":"https://api.github.com/repos/oblaka/qna/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/oblaka/qna/pulls/2","id":36901231,"html_url":"https://github.com/oblaka/qna/pull/2","diff_url":"https://github.com/oblaka/qna/pull/2.diff","patch_url":"https://github.com/oblaka/qna/pull/2.patch","issue_url":"https://api.github.com/repos/oblaka/qna/issues/2","number":2,"state":"open","locked":false,"title":"Lesson 4","user":{"login":"oblaka","id":5460740,"avatar_url":"https://avatars.githubusercontent.com/u/5460740?v=3","gravatar_id":"","url":"https://api.github.com/users/oblaka","html_url":"https://github.com/oblaka","followers_url":"https://api.github.com/users/oblaka/followers","following_url":"https://api.github.com/users/oblaka/following{/other_user}","gists_url":"https://api.github.com/users/oblaka/gists{/gist_id}","starred_url":"https://api.github.com/users/oblaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oblaka/subscriptions","organizations_url":"https://api.github.com/users/oblaka/orgs","repos_url":"https://api.github.com/users/oblaka/repos","events_url":"https://api.github.com/users/oblaka/events{/privacy}","received_events_url":"https://api.github.com/users/oblaka/received_events","type":"User","site_admin":false},"body":"User can create and delete questions and answers","created_at":"2015-06-04T04:20:18Z","updated_at":"2015-06-05T06:06:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38d2b21f393647f09af0def3ec152659aed8b956","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/oblaka/qna/pulls/2/commits","review_comments_url":"https://api.github.com/repos/oblaka/qna/pulls/2/comments","review_comment_url":"https://api.github.com/repos/oblaka/qna/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oblaka/qna/issues/2/comments","statuses_url":"https://api.github.com/repos/oblaka/qna/statuses/851f889bc65935da6d55462e525be3a76a8ce2a3","head":{"label":"oblaka:lesson4","ref":"lesson4","sha":"851f889bc65935da6d55462e525be3a76a8ce2a3","user":{"login":"oblaka","id":5460740,"avatar_url":"https://avatars.githubusercontent.com/u/5460740?v=3","gravatar_id":"","url":"https://api.github.com/users/oblaka","html_url":"https://github.com/oblaka","followers_url":"https://api.github.com/users/oblaka/followers","following_url":"https://api.github.com/users/oblaka/following{/other_user}","gists_url":"https://api.github.com/users/oblaka/gists{/gist_id}","starred_url":"https://api.github.com/users/oblaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oblaka/subscriptions","organizations_url":"https://api.github.com/users/oblaka/orgs","repos_url":"https://api.github.com/users/oblaka/repos","events_url":"https://api.github.com/users/oblaka/events{/privacy}","received_events_url":"https://api.github.com/users/oblaka/received_events","type":"User","site_admin":false},"repo":{"id":36626152,"name":"qna","full_name":"oblaka/qna","owner":{"login":"oblaka","id":5460740,"avatar_url":"https://avatars.githubusercontent.com/u/5460740?v=3","gravatar_id":"","url":"https://api.github.com/users/oblaka","html_url":"https://github.com/oblaka","followers_url":"https://api.github.com/users/oblaka/followers","following_url":"https://api.github.com/users/oblaka/following{/other_user}","gists_url":"https://api.github.com/users/oblaka/gists{/gist_id}","starred_url":"https://api.github.com/users/oblaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oblaka/subscriptions","organizations_url":"https://api.github.com/users/oblaka/orgs","repos_url":"https://api.github.com/users/oblaka/repos","events_url":"https://api.github.com/users/oblaka/events{/privacy}","received_events_url":"https://api.github.com/users/oblaka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oblaka/qna","description":"Thinknetica course project","fork":false,"url":"https://api.github.com/repos/oblaka/qna","forks_url":"https://api.github.com/repos/oblaka/qna/forks","keys_url":"https://api.github.com/repos/oblaka/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oblaka/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oblaka/qna/teams","hooks_url":"https://api.github.com/repos/oblaka/qna/hooks","issue_events_url":"https://api.github.com/repos/oblaka/qna/issues/events{/number}","events_url":"https://api.github.com/repos/oblaka/qna/events","assignees_url":"https://api.github.com/repos/oblaka/qna/assignees{/user}","branches_url":"https://api.github.com/repos/oblaka/qna/branches{/branch}","tags_url":"https://api.github.com/repos/oblaka/qna/tags","blobs_url":"https://api.github.com/repos/oblaka/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oblaka/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oblaka/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/oblaka/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oblaka/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/oblaka/qna/languages","stargazers_url":"https://api.github.com/repos/oblaka/qna/stargazers","contributors_url":"https://api.github.com/repos/oblaka/qna/contributors","subscribers_url":"https://api.github.com/repos/oblaka/qna/subscribers","subscription_url":"https://api.github.com/repos/oblaka/qna/subscription","commits_url":"https://api.github.com/repos/oblaka/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/oblaka/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/oblaka/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/oblaka/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/oblaka/qna/contents/{+path}","compare_url":"https://api.github.com/repos/oblaka/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oblaka/qna/merges","archive_url":"https://api.github.com/repos/oblaka/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oblaka/qna/downloads","issues_url":"https://api.github.com/repos/oblaka/qna/issues{/number}","pulls_url":"https://api.github.com/repos/oblaka/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/oblaka/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/oblaka/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oblaka/qna/labels{/name}","releases_url":"https://api.github.com/repos/oblaka/qna/releases{/id}","created_at":"2015-05-31T23:05:35Z","updated_at":"2015-05-31T23:05:41Z","pushed_at":"2015-06-04T17:37:50Z","git_url":"git://github.com/oblaka/qna.git","ssh_url":"git@github.com:oblaka/qna.git","clone_url":"https://github.com/oblaka/qna.git","svn_url":"https://github.com/oblaka/qna","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"oblaka:master","ref":"master","sha":"1ebb6a51d43b9f523a6d7886a59d279fad908671","user":{"login":"oblaka","id":5460740,"avatar_url":"https://avatars.githubusercontent.com/u/5460740?v=3","gravatar_id":"","url":"https://api.github.com/users/oblaka","html_url":"https://github.com/oblaka","followers_url":"https://api.github.com/users/oblaka/followers","following_url":"https://api.github.com/users/oblaka/following{/other_user}","gists_url":"https://api.github.com/users/oblaka/gists{/gist_id}","starred_url":"https://api.github.com/users/oblaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oblaka/subscriptions","organizations_url":"https://api.github.com/users/oblaka/orgs","repos_url":"https://api.github.com/users/oblaka/repos","events_url":"https://api.github.com/users/oblaka/events{/privacy}","received_events_url":"https://api.github.com/users/oblaka/received_events","type":"User","site_admin":false},"repo":{"id":36626152,"name":"qna","full_name":"oblaka/qna","owner":{"login":"oblaka","id":5460740,"avatar_url":"https://avatars.githubusercontent.com/u/5460740?v=3","gravatar_id":"","url":"https://api.github.com/users/oblaka","html_url":"https://github.com/oblaka","followers_url":"https://api.github.com/users/oblaka/followers","following_url":"https://api.github.com/users/oblaka/following{/other_user}","gists_url":"https://api.github.com/users/oblaka/gists{/gist_id}","starred_url":"https://api.github.com/users/oblaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oblaka/subscriptions","organizations_url":"https://api.github.com/users/oblaka/orgs","repos_url":"https://api.github.com/users/oblaka/repos","events_url":"https://api.github.com/users/oblaka/events{/privacy}","received_events_url":"https://api.github.com/users/oblaka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oblaka/qna","description":"Thinknetica course project","fork":false,"url":"https://api.github.com/repos/oblaka/qna","forks_url":"https://api.github.com/repos/oblaka/qna/forks","keys_url":"https://api.github.com/repos/oblaka/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oblaka/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oblaka/qna/teams","hooks_url":"https://api.github.com/repos/oblaka/qna/hooks","issue_events_url":"https://api.github.com/repos/oblaka/qna/issues/events{/number}","events_url":"https://api.github.com/repos/oblaka/qna/events","assignees_url":"https://api.github.com/repos/oblaka/qna/assignees{/user}","branches_url":"https://api.github.com/repos/oblaka/qna/branches{/branch}","tags_url":"https://api.github.com/repos/oblaka/qna/tags","blobs_url":"https://api.github.com/repos/oblaka/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oblaka/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oblaka/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/oblaka/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oblaka/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/oblaka/qna/languages","stargazers_url":"https://api.github.com/repos/oblaka/qna/stargazers","contributors_url":"https://api.github.com/repos/oblaka/qna/contributors","subscribers_url":"https://api.github.com/repos/oblaka/qna/subscribers","subscription_url":"https://api.github.com/repos/oblaka/qna/subscription","commits_url":"https://api.github.com/repos/oblaka/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/oblaka/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/oblaka/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/oblaka/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/oblaka/qna/contents/{+path}","compare_url":"https://api.github.com/repos/oblaka/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oblaka/qna/merges","archive_url":"https://api.github.com/repos/oblaka/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oblaka/qna/downloads","issues_url":"https://api.github.com/repos/oblaka/qna/issues{/number}","pulls_url":"https://api.github.com/repos/oblaka/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/oblaka/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/oblaka/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oblaka/qna/labels{/name}","releases_url":"https://api.github.com/repos/oblaka/qna/releases{/id}","created_at":"2015-05-31T23:05:35Z","updated_at":"2015-05-31T23:05:41Z","pushed_at":"2015-06-04T17:37:50Z","git_url":"git://github.com/oblaka/qna.git","ssh_url":"git@github.com:oblaka/qna.git","clone_url":"https://github.com/oblaka/qna.git","svn_url":"https://github.com/oblaka/qna","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oblaka/qna/pulls/2"},"html":{"href":"https://github.com/oblaka/qna/pull/2"},"issue":{"href":"https://api.github.com/repos/oblaka/qna/issues/2"},"comments":{"href":"https://api.github.com/repos/oblaka/qna/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/oblaka/qna/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/oblaka/qna/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oblaka/qna/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/oblaka/qna/statuses/851f889bc65935da6d55462e525be3a76a8ce2a3"}}}}