{"action":"created","comment":{"url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls/comments/31998089","id":31998089,"diff_hunk":"@@ -20,30 +24,57 @@\n   end\n \n   describe \"POST /interviewer\" do\n-    let(:database) {{'interviewer' => collection}}\n-    let(:interviewer) {{name:'Jichao', email:'jichao@thoughtworks.com'}}\n+\n     before do\n-      allow(collection).to receive(:set) {double(value: interviewer)}\n+      allow(collection).to receive(:create) { double(value: interviewer) }\n     end\n     it \"returns new interviewer id\" do\n-\n       post \"/api/v1/interviewer\", interviewer\n       expect_json(interviewer)\n     end\n   end\n \n   describe \"GET /interviewers\" do\n-    let(:database) {{'interviewer' => collection}}\n-    let(:interviewer1) {{name:'Jichao', email:'jichao@thoughtworks.com'}}\n-    let(:interviewer2) {{name:'Ouyang', email:'ouayng@thoughtworks.com'}}\n-    before do\n-      expect(collection).to receive(:find_all).and_return([double(value: interviewer1),double(value: interviewer2) ])\n-    end\n-    it \"returns all interviewers\" do\n+    let(:collection) { [double(value: interviewer1, key: '001'), double(value: interviewer2, key: '002')] }\n+    let(:interviewer1) { {name: 'Jichao', email: 'jichao@thoughtworks.com', key: '001'} }\n+    let(:interviewer2) { {name: 'Ouyang', email: 'ouayng@thoughtworks.com', key: '002'} }\n \n+    it \"returns all interviewers\" do\n       get \"/api/v1/interviewers\"\n-      expect(json_body).to eql([interviewer1,interviewer2])\n+      expect(json_body).to eql([interviewer1, interviewer2])\n+    end\n+  end\n+\n+  describe 'GET /interviewer/:id' do\n+    let(:key) { '123456' }\n+    let(:collection) { {'123456' => interviewer_record_in_db} }\n+    it \"returns interviewer with key=:id\" do\n+      get \"/api/v1/interviewer/#{key}\"\n+      expect(json_body).to eql({name: 'Jichao', email: 'jichao@thoughtworks.com', key: '123456'})","path":"spec/api_spec.rb","position":70,"original_position":70,"commit_id":"36374ecc890707fea0965f4068c25e4f64c292ec","original_commit_id":"36374ecc890707fea0965f4068c25e4f64c292ec","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":"Line is too long. [97/80]<br>Redundant curly braces around a hash parameter.<br>Space inside { missing.<br>Space inside } missing.<br>Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-06-09T09:57:55Z","updated_at":"2015-06-09T09:57:55Z","html_url":"https://github.com/jcouyang/hr-s-little-helper/pull/14#discussion_r31998089","pull_request_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls/comments/31998089"},"html":{"href":"https://github.com/jcouyang/hr-s-little-helper/pull/14#discussion_r31998089"},"pull_request":{"href":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls/14","id":37236695,"html_url":"https://github.com/jcouyang/hr-s-little-helper/pull/14","diff_url":"https://github.com/jcouyang/hr-s-little-helper/pull/14.diff","patch_url":"https://github.com/jcouyang/hr-s-little-helper/pull/14.patch","issue_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/issues/14","number":14,"state":"open","locked":false,"title":"add test for update delete","user":{"login":"sunchen115","id":8046538,"avatar_url":"https://avatars.githubusercontent.com/u/8046538?v=3","gravatar_id":"","url":"https://api.github.com/users/sunchen115","html_url":"https://github.com/sunchen115","followers_url":"https://api.github.com/users/sunchen115/followers","following_url":"https://api.github.com/users/sunchen115/following{/other_user}","gists_url":"https://api.github.com/users/sunchen115/gists{/gist_id}","starred_url":"https://api.github.com/users/sunchen115/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunchen115/subscriptions","organizations_url":"https://api.github.com/users/sunchen115/orgs","repos_url":"https://api.github.com/users/sunchen115/repos","events_url":"https://api.github.com/users/sunchen115/events{/privacy}","received_events_url":"https://api.github.com/users/sunchen115/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-09T09:57:47Z","updated_at":"2015-06-09T09:57:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls/14/commits","review_comments_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls/14/comments","review_comment_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/issues/14/comments","statuses_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/statuses/36374ecc890707fea0965f4068c25e4f64c292ec","head":{"label":"sunchen115:master","ref":"master","sha":"36374ecc890707fea0965f4068c25e4f64c292ec","user":{"login":"sunchen115","id":8046538,"avatar_url":"https://avatars.githubusercontent.com/u/8046538?v=3","gravatar_id":"","url":"https://api.github.com/users/sunchen115","html_url":"https://github.com/sunchen115","followers_url":"https://api.github.com/users/sunchen115/followers","following_url":"https://api.github.com/users/sunchen115/following{/other_user}","gists_url":"https://api.github.com/users/sunchen115/gists{/gist_id}","starred_url":"https://api.github.com/users/sunchen115/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunchen115/subscriptions","organizations_url":"https://api.github.com/users/sunchen115/orgs","repos_url":"https://api.github.com/users/sunchen115/repos","events_url":"https://api.github.com/users/sunchen115/events{/privacy}","received_events_url":"https://api.github.com/users/sunchen115/received_events","type":"User","site_admin":false},"repo":{"id":36918228,"name":"hr-s-little-helper","full_name":"sunchen115/hr-s-little-helper","owner":{"login":"sunchen115","id":8046538,"avatar_url":"https://avatars.githubusercontent.com/u/8046538?v=3","gravatar_id":"","url":"https://api.github.com/users/sunchen115","html_url":"https://github.com/sunchen115","followers_url":"https://api.github.com/users/sunchen115/followers","following_url":"https://api.github.com/users/sunchen115/following{/other_user}","gists_url":"https://api.github.com/users/sunchen115/gists{/gist_id}","starred_url":"https://api.github.com/users/sunchen115/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunchen115/subscriptions","organizations_url":"https://api.github.com/users/sunchen115/orgs","repos_url":"https://api.github.com/users/sunchen115/repos","events_url":"https://api.github.com/users/sunchen115/events{/privacy}","received_events_url":"https://api.github.com/users/sunchen115/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sunchen115/hr-s-little-helper","description":"HR's little helper","fork":true,"url":"https://api.github.com/repos/sunchen115/hr-s-little-helper","forks_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/forks","keys_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/teams","hooks_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/hooks","issue_events_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/issues/events{/number}","events_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/events","assignees_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/assignees{/user}","branches_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/branches{/branch}","tags_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/tags","blobs_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/git/refs{/sha}","trees_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/statuses/{sha}","languages_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/languages","stargazers_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/stargazers","contributors_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/contributors","subscribers_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/subscribers","subscription_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/subscription","commits_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/commits{/sha}","git_commits_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/git/commits{/sha}","comments_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/comments{/number}","issue_comment_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/issues/comments{/number}","contents_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/contents/{+path}","compare_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/merges","archive_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/downloads","issues_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/issues{/number}","pulls_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/pulls{/number}","milestones_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/milestones{/number}","notifications_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/labels{/name}","releases_url":"https://api.github.com/repos/sunchen115/hr-s-little-helper/releases{/id}","created_at":"2015-06-05T07:17:34Z","updated_at":"2015-06-05T07:17:35Z","pushed_at":"2015-06-09T09:56:17Z","git_url":"git://github.com/sunchen115/hr-s-little-helper.git","ssh_url":"git@github.com:sunchen115/hr-s-little-helper.git","clone_url":"https://github.com/sunchen115/hr-s-little-helper.git","svn_url":"https://github.com/sunchen115/hr-s-little-helper","homepage":null,"size":93,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"jcouyang:master","ref":"master","sha":"aa5380777a1daa772fb68f6bd29449a18f4aa9f9","user":{"login":"jcouyang","id":1235045,"avatar_url":"https://avatars.githubusercontent.com/u/1235045?v=3","gravatar_id":"","url":"https://api.github.com/users/jcouyang","html_url":"https://github.com/jcouyang","followers_url":"https://api.github.com/users/jcouyang/followers","following_url":"https://api.github.com/users/jcouyang/following{/other_user}","gists_url":"https://api.github.com/users/jcouyang/gists{/gist_id}","starred_url":"https://api.github.com/users/jcouyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcouyang/subscriptions","organizations_url":"https://api.github.com/users/jcouyang/orgs","repos_url":"https://api.github.com/users/jcouyang/repos","events_url":"https://api.github.com/users/jcouyang/events{/privacy}","received_events_url":"https://api.github.com/users/jcouyang/received_events","type":"User","site_admin":false},"repo":{"id":36204336,"name":"hr-s-little-helper","full_name":"jcouyang/hr-s-little-helper","owner":{"login":"jcouyang","id":1235045,"avatar_url":"https://avatars.githubusercontent.com/u/1235045?v=3","gravatar_id":"","url":"https://api.github.com/users/jcouyang","html_url":"https://github.com/jcouyang","followers_url":"https://api.github.com/users/jcouyang/followers","following_url":"https://api.github.com/users/jcouyang/following{/other_user}","gists_url":"https://api.github.com/users/jcouyang/gists{/gist_id}","starred_url":"https://api.github.com/users/jcouyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcouyang/subscriptions","organizations_url":"https://api.github.com/users/jcouyang/orgs","repos_url":"https://api.github.com/users/jcouyang/repos","events_url":"https://api.github.com/users/jcouyang/events{/privacy}","received_events_url":"https://api.github.com/users/jcouyang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jcouyang/hr-s-little-helper","description":"HR's little helper","fork":false,"url":"https://api.github.com/repos/jcouyang/hr-s-little-helper","forks_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/forks","keys_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/teams","hooks_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/hooks","issue_events_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/issues/events{/number}","events_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/events","assignees_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/assignees{/user}","branches_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/branches{/branch}","tags_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/tags","blobs_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/statuses/{sha}","languages_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/languages","stargazers_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/stargazers","contributors_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/contributors","subscribers_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/subscribers","subscription_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/subscription","commits_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/issues/comments{/number}","contents_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/contents/{+path}","compare_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/merges","archive_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/downloads","issues_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/issues{/number}","pulls_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls{/number}","milestones_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/milestones{/number}","notifications_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/labels{/name}","releases_url":"https://api.github.com/repos/jcouyang/hr-s-little-helper/releases{/id}","created_at":"2015-05-25T02:03:07Z","updated_at":"2015-05-27T07:31:25Z","pushed_at":"2015-06-09T09:57:48Z","git_url":"git://github.com/jcouyang/hr-s-little-helper.git","ssh_url":"git@github.com:jcouyang/hr-s-little-helper.git","clone_url":"https://github.com/jcouyang/hr-s-little-helper.git","svn_url":"https://github.com/jcouyang/hr-s-little-helper","homepage":null,"size":179,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls/14"},"html":{"href":"https://github.com/jcouyang/hr-s-little-helper/pull/14"},"issue":{"href":"https://api.github.com/repos/jcouyang/hr-s-little-helper/issues/14"},"comments":{"href":"https://api.github.com/repos/jcouyang/hr-s-little-helper/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jcouyang/hr-s-little-helper/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/jcouyang/hr-s-little-helper/statuses/36374ecc890707fea0965f4068c25e4f64c292ec"}}}}