{"action":"created","comment":{"url":"https://api.github.com/repos/yorikim/so/pulls/comments/46659839","id":46659839,"diff_hunk":"@@ -107,4 +47,19 @@\n       end\n     end\n   end\n+\n+  def do_request_show(options = {})\n+    answer = create(:answer, question: question)\n+    get :show, {question_id: question, id: answer, format: :json}.merge(options)\n+  end\n+\n+  def do_request_index(options = {})\n+    get :index, {question_id: question, format: :json}.merge(options)\n+  end\n+\n+  def do_request_create(options = {})\n+    post :create, {question_id: question, answer: attributes_for(:answer), format: :json}.merge(options)\n+  end\n+\n+  it_behaves_like 'API Authenticable'","path":"spec/controllers/api/v1/answers_controller_spec.rb","position":104,"original_position":104,"commit_id":"037f0f78dcd2e9792ca97b9a6aee8ca8774143f9","original_commit_id":"037f0f78dcd2e9792ca97b9a6aee8ca8774143f9","user":{"login":"vkurennov","id":968537,"avatar_url":"https://avatars.githubusercontent.com/u/968537?v=3","gravatar_id":"","url":"https://api.github.com/users/vkurennov","html_url":"https://github.com/vkurennov","followers_url":"https://api.github.com/users/vkurennov/followers","following_url":"https://api.github.com/users/vkurennov/following{/other_user}","gists_url":"https://api.github.com/users/vkurennov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurennov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurennov/subscriptions","organizations_url":"https://api.github.com/users/vkurennov/orgs","repos_url":"https://api.github.com/users/vkurennov/repos","events_url":"https://api.github.com/users/vkurennov/events{/privacy}","received_events_url":"https://api.github.com/users/vkurennov/received_events","type":"User","site_admin":false},"body":"Обычно, это выносят в начало спеки, а не в конец.","created_at":"2015-12-04T08:44:33Z","updated_at":"2015-12-04T08:44:33Z","html_url":"https://github.com/yorikim/so/pull/14#discussion_r46659839","pull_request_url":"https://api.github.com/repos/yorikim/so/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/yorikim/so/pulls/comments/46659839"},"html":{"href":"https://github.com/yorikim/so/pull/14#discussion_r46659839"},"pull_request":{"href":"https://api.github.com/repos/yorikim/so/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/yorikim/so/pulls/14","id":52639824,"html_url":"https://github.com/yorikim/so/pull/14","diff_url":"https://github.com/yorikim/so/pull/14.diff","patch_url":"https://github.com/yorikim/so/pull/14.patch","issue_url":"https://api.github.com/repos/yorikim/so/issues/14","number":14,"state":"open","locked":false,"title":"Lesson16","user":{"login":"yorikim","id":1620973,"avatar_url":"https://avatars.githubusercontent.com/u/1620973?v=3","gravatar_id":"","url":"https://api.github.com/users/yorikim","html_url":"https://github.com/yorikim","followers_url":"https://api.github.com/users/yorikim/followers","following_url":"https://api.github.com/users/yorikim/following{/other_user}","gists_url":"https://api.github.com/users/yorikim/gists{/gist_id}","starred_url":"https://api.github.com/users/yorikim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorikim/subscriptions","organizations_url":"https://api.github.com/users/yorikim/orgs","repos_url":"https://api.github.com/users/yorikim/repos","events_url":"https://api.github.com/users/yorikim/events{/privacy}","received_events_url":"https://api.github.com/users/yorikim/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-04T07:59:26Z","updated_at":"2015-12-04T08:44:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51a0f8dd59b2e5d517d20ece1c1435eedc00c2e0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yorikim/so/pulls/14/commits","review_comments_url":"https://api.github.com/repos/yorikim/so/pulls/14/comments","review_comment_url":"https://api.github.com/repos/yorikim/so/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yorikim/so/issues/14/comments","statuses_url":"https://api.github.com/repos/yorikim/so/statuses/037f0f78dcd2e9792ca97b9a6aee8ca8774143f9","head":{"label":"yorikim:lesson16","ref":"lesson16","sha":"037f0f78dcd2e9792ca97b9a6aee8ca8774143f9","user":{"login":"yorikim","id":1620973,"avatar_url":"https://avatars.githubusercontent.com/u/1620973?v=3","gravatar_id":"","url":"https://api.github.com/users/yorikim","html_url":"https://github.com/yorikim","followers_url":"https://api.github.com/users/yorikim/followers","following_url":"https://api.github.com/users/yorikim/following{/other_user}","gists_url":"https://api.github.com/users/yorikim/gists{/gist_id}","starred_url":"https://api.github.com/users/yorikim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorikim/subscriptions","organizations_url":"https://api.github.com/users/yorikim/orgs","repos_url":"https://api.github.com/users/yorikim/repos","events_url":"https://api.github.com/users/yorikim/events{/privacy}","received_events_url":"https://api.github.com/users/yorikim/received_events","type":"User","site_admin":false},"repo":{"id":45777196,"name":"so","full_name":"yorikim/so","owner":{"login":"yorikim","id":1620973,"avatar_url":"https://avatars.githubusercontent.com/u/1620973?v=3","gravatar_id":"","url":"https://api.github.com/users/yorikim","html_url":"https://github.com/yorikim","followers_url":"https://api.github.com/users/yorikim/followers","following_url":"https://api.github.com/users/yorikim/following{/other_user}","gists_url":"https://api.github.com/users/yorikim/gists{/gist_id}","starred_url":"https://api.github.com/users/yorikim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorikim/subscriptions","organizations_url":"https://api.github.com/users/yorikim/orgs","repos_url":"https://api.github.com/users/yorikim/repos","events_url":"https://api.github.com/users/yorikim/events{/privacy}","received_events_url":"https://api.github.com/users/yorikim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yorikim/so","description":"simple stack overflow","fork":false,"url":"https://api.github.com/repos/yorikim/so","forks_url":"https://api.github.com/repos/yorikim/so/forks","keys_url":"https://api.github.com/repos/yorikim/so/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yorikim/so/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yorikim/so/teams","hooks_url":"https://api.github.com/repos/yorikim/so/hooks","issue_events_url":"https://api.github.com/repos/yorikim/so/issues/events{/number}","events_url":"https://api.github.com/repos/yorikim/so/events","assignees_url":"https://api.github.com/repos/yorikim/so/assignees{/user}","branches_url":"https://api.github.com/repos/yorikim/so/branches{/branch}","tags_url":"https://api.github.com/repos/yorikim/so/tags","blobs_url":"https://api.github.com/repos/yorikim/so/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yorikim/so/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yorikim/so/git/refs{/sha}","trees_url":"https://api.github.com/repos/yorikim/so/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yorikim/so/statuses/{sha}","languages_url":"https://api.github.com/repos/yorikim/so/languages","stargazers_url":"https://api.github.com/repos/yorikim/so/stargazers","contributors_url":"https://api.github.com/repos/yorikim/so/contributors","subscribers_url":"https://api.github.com/repos/yorikim/so/subscribers","subscription_url":"https://api.github.com/repos/yorikim/so/subscription","commits_url":"https://api.github.com/repos/yorikim/so/commits{/sha}","git_commits_url":"https://api.github.com/repos/yorikim/so/git/commits{/sha}","comments_url":"https://api.github.com/repos/yorikim/so/comments{/number}","issue_comment_url":"https://api.github.com/repos/yorikim/so/issues/comments{/number}","contents_url":"https://api.github.com/repos/yorikim/so/contents/{+path}","compare_url":"https://api.github.com/repos/yorikim/so/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yorikim/so/merges","archive_url":"https://api.github.com/repos/yorikim/so/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yorikim/so/downloads","issues_url":"https://api.github.com/repos/yorikim/so/issues{/number}","pulls_url":"https://api.github.com/repos/yorikim/so/pulls{/number}","milestones_url":"https://api.github.com/repos/yorikim/so/milestones{/number}","notifications_url":"https://api.github.com/repos/yorikim/so/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yorikim/so/labels{/name}","releases_url":"https://api.github.com/repos/yorikim/so/releases{/id}","created_at":"2015-11-08T11:12:48Z","updated_at":"2015-12-03T12:33:10Z","pushed_at":"2015-12-04T07:59:26Z","git_url":"git://github.com/yorikim/so.git","ssh_url":"git@github.com:yorikim/so.git","clone_url":"https://github.com/yorikim/so.git","svn_url":"https://github.com/yorikim/so","homepage":null,"size":894,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"yorikim:master","ref":"master","sha":"c569384afd6a08c7a1a02a38d58895346a4529e5","user":{"login":"yorikim","id":1620973,"avatar_url":"https://avatars.githubusercontent.com/u/1620973?v=3","gravatar_id":"","url":"https://api.github.com/users/yorikim","html_url":"https://github.com/yorikim","followers_url":"https://api.github.com/users/yorikim/followers","following_url":"https://api.github.com/users/yorikim/following{/other_user}","gists_url":"https://api.github.com/users/yorikim/gists{/gist_id}","starred_url":"https://api.github.com/users/yorikim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorikim/subscriptions","organizations_url":"https://api.github.com/users/yorikim/orgs","repos_url":"https://api.github.com/users/yorikim/repos","events_url":"https://api.github.com/users/yorikim/events{/privacy}","received_events_url":"https://api.github.com/users/yorikim/received_events","type":"User","site_admin":false},"repo":{"id":45777196,"name":"so","full_name":"yorikim/so","owner":{"login":"yorikim","id":1620973,"avatar_url":"https://avatars.githubusercontent.com/u/1620973?v=3","gravatar_id":"","url":"https://api.github.com/users/yorikim","html_url":"https://github.com/yorikim","followers_url":"https://api.github.com/users/yorikim/followers","following_url":"https://api.github.com/users/yorikim/following{/other_user}","gists_url":"https://api.github.com/users/yorikim/gists{/gist_id}","starred_url":"https://api.github.com/users/yorikim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorikim/subscriptions","organizations_url":"https://api.github.com/users/yorikim/orgs","repos_url":"https://api.github.com/users/yorikim/repos","events_url":"https://api.github.com/users/yorikim/events{/privacy}","received_events_url":"https://api.github.com/users/yorikim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yorikim/so","description":"simple stack overflow","fork":false,"url":"https://api.github.com/repos/yorikim/so","forks_url":"https://api.github.com/repos/yorikim/so/forks","keys_url":"https://api.github.com/repos/yorikim/so/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yorikim/so/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yorikim/so/teams","hooks_url":"https://api.github.com/repos/yorikim/so/hooks","issue_events_url":"https://api.github.com/repos/yorikim/so/issues/events{/number}","events_url":"https://api.github.com/repos/yorikim/so/events","assignees_url":"https://api.github.com/repos/yorikim/so/assignees{/user}","branches_url":"https://api.github.com/repos/yorikim/so/branches{/branch}","tags_url":"https://api.github.com/repos/yorikim/so/tags","blobs_url":"https://api.github.com/repos/yorikim/so/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yorikim/so/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yorikim/so/git/refs{/sha}","trees_url":"https://api.github.com/repos/yorikim/so/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yorikim/so/statuses/{sha}","languages_url":"https://api.github.com/repos/yorikim/so/languages","stargazers_url":"https://api.github.com/repos/yorikim/so/stargazers","contributors_url":"https://api.github.com/repos/yorikim/so/contributors","subscribers_url":"https://api.github.com/repos/yorikim/so/subscribers","subscription_url":"https://api.github.com/repos/yorikim/so/subscription","commits_url":"https://api.github.com/repos/yorikim/so/commits{/sha}","git_commits_url":"https://api.github.com/repos/yorikim/so/git/commits{/sha}","comments_url":"https://api.github.com/repos/yorikim/so/comments{/number}","issue_comment_url":"https://api.github.com/repos/yorikim/so/issues/comments{/number}","contents_url":"https://api.github.com/repos/yorikim/so/contents/{+path}","compare_url":"https://api.github.com/repos/yorikim/so/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yorikim/so/merges","archive_url":"https://api.github.com/repos/yorikim/so/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yorikim/so/downloads","issues_url":"https://api.github.com/repos/yorikim/so/issues{/number}","pulls_url":"https://api.github.com/repos/yorikim/so/pulls{/number}","milestones_url":"https://api.github.com/repos/yorikim/so/milestones{/number}","notifications_url":"https://api.github.com/repos/yorikim/so/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yorikim/so/labels{/name}","releases_url":"https://api.github.com/repos/yorikim/so/releases{/id}","created_at":"2015-11-08T11:12:48Z","updated_at":"2015-12-03T12:33:10Z","pushed_at":"2015-12-04T07:59:26Z","git_url":"git://github.com/yorikim/so.git","ssh_url":"git@github.com:yorikim/so.git","clone_url":"https://github.com/yorikim/so.git","svn_url":"https://github.com/yorikim/so","homepage":null,"size":894,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yorikim/so/pulls/14"},"html":{"href":"https://github.com/yorikim/so/pull/14"},"issue":{"href":"https://api.github.com/repos/yorikim/so/issues/14"},"comments":{"href":"https://api.github.com/repos/yorikim/so/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/yorikim/so/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/yorikim/so/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yorikim/so/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/yorikim/so/statuses/037f0f78dcd2e9792ca97b9a6aee8ca8774143f9"}}}}