{"action":"created","comment":{"url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/comments/23883086","id":23883086,"diff_hunk":"@@ -14,13 +13,25 @@\n \n   describe \"show\" do\n     it \"returns a rating\" do\n-    rating = create(:rating)\n+      rating = create(:rating)\n+\n+      get :show, format: :json, id: rating.id\n+\n+      json_response = JsonResponse.new(response)\n+      expect(json_response.headers).to have_http_status(:ok)\n+      expect(json_response.rating_id).to eq(rating.id)\n+    end\n+  end\n \n-    get :show, format: :json, id: rating.id\n+  describe \"create\" do\n+    it \"creates a rating\" do\n+      user = create(:user)\n+      skill = create(:skill)\n+      allow_any_instance_of(Api::V1::BaseController).to receive(:current_user).and_return(user)\n \n-    json_response = JsonResponse.new(response)\n-    expect(json_response.headers).to have_http_status(:ok)\n-    expect(json_response.rating_id).to eq(rating.id)\n+      expect {","path":"spec/controllers/api/v1/ratings_controller_spec.rb","position":31,"original_position":31,"commit_id":"eafa2b10f827e8db338d0ae28d96cd98e09f09d9","original_commit_id":"eafa2b10f827e8db338d0ae28d96cd98e09f09d9","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":"Avoid using {...} for multi-line blocks.","created_at":"2015-01-31T00:32:01Z","updated_at":"2015-01-31T00:32:01Z","html_url":"https://github.com/turingschool-projects/skill-inventory-rails/pull/57#discussion_r23883086","pull_request_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/comments/23883086"},"html":{"href":"https://github.com/turingschool-projects/skill-inventory-rails/pull/57#discussion_r23883086"},"pull_request":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/57","id":28404924,"html_url":"https://github.com/turingschool-projects/skill-inventory-rails/pull/57","diff_url":"https://github.com/turingschool-projects/skill-inventory-rails/pull/57.diff","patch_url":"https://github.com/turingschool-projects/skill-inventory-rails/pull/57.patch","issue_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/57","number":57,"state":"open","locked":false,"title":"Refactor RaitingsController#create","user":{"login":"stevekinney","id":251000,"avatar_url":"https://avatars.githubusercontent.com/u/251000?v=3","gravatar_id":"","url":"https://api.github.com/users/stevekinney","html_url":"https://github.com/stevekinney","followers_url":"https://api.github.com/users/stevekinney/followers","following_url":"https://api.github.com/users/stevekinney/following{/other_user}","gists_url":"https://api.github.com/users/stevekinney/gists{/gist_id}","starred_url":"https://api.github.com/users/stevekinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevekinney/subscriptions","organizations_url":"https://api.github.com/users/stevekinney/orgs","repos_url":"https://api.github.com/users/stevekinney/repos","events_url":"https://api.github.com/users/stevekinney/events{/privacy}","received_events_url":"https://api.github.com/users/stevekinney/received_events","type":"User","site_admin":false},"body":"@jmejia and I wrote a test for `RatingsController#create`.\r\n\r\nWe then refactored the method by:\r\n\r\n* Relying on just `current_user` instead of a combination of `current_user`\r\n* Simplifying some ActiveRecord queries\r\n* Fixing a syntax error on the unhappy path\r\n* Removing the logic for updating a rating inside of the `create` method","created_at":"2015-01-31T00:31:56Z","updated_at":"2015-01-31T00:32:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"022ec58cdff88eb45bc502acc22920556569fd20","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/57/commits","review_comments_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/57/comments","review_comment_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/comments/{number}","comments_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/57/comments","statuses_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/statuses/eafa2b10f827e8db338d0ae28d96cd98e09f09d9","head":{"label":"turingschool-projects:refactor-ratings-create","ref":"refactor-ratings-create","sha":"eafa2b10f827e8db338d0ae28d96cd98e09f09d9","user":{"login":"turingschool-projects","id":10454571,"avatar_url":"https://avatars.githubusercontent.com/u/10454571?v=3","gravatar_id":"","url":"https://api.github.com/users/turingschool-projects","html_url":"https://github.com/turingschool-projects","followers_url":"https://api.github.com/users/turingschool-projects/followers","following_url":"https://api.github.com/users/turingschool-projects/following{/other_user}","gists_url":"https://api.github.com/users/turingschool-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/turingschool-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turingschool-projects/subscriptions","organizations_url":"https://api.github.com/users/turingschool-projects/orgs","repos_url":"https://api.github.com/users/turingschool-projects/repos","events_url":"https://api.github.com/users/turingschool-projects/events{/privacy}","received_events_url":"https://api.github.com/users/turingschool-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":28992701,"name":"skill-inventory-rails","full_name":"turingschool-projects/skill-inventory-rails","owner":{"login":"turingschool-projects","id":10454571,"avatar_url":"https://avatars.githubusercontent.com/u/10454571?v=3","gravatar_id":"","url":"https://api.github.com/users/turingschool-projects","html_url":"https://github.com/turingschool-projects","followers_url":"https://api.github.com/users/turingschool-projects/followers","following_url":"https://api.github.com/users/turingschool-projects/following{/other_user}","gists_url":"https://api.github.com/users/turingschool-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/turingschool-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turingschool-projects/subscriptions","organizations_url":"https://api.github.com/users/turingschool-projects/orgs","repos_url":"https://api.github.com/users/turingschool-projects/repos","events_url":"https://api.github.com/users/turingschool-projects/events{/privacy}","received_events_url":"https://api.github.com/users/turingschool-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/turingschool-projects/skill-inventory-rails","description":"","fork":false,"url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails","forks_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/forks","keys_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/teams","hooks_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/hooks","issue_events_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/events{/number}","events_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/events","assignees_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/assignees{/user}","branches_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/branches{/branch}","tags_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/tags","blobs_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/languages","stargazers_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/stargazers","contributors_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/contributors","subscribers_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/subscribers","subscription_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/subscription","commits_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/contents/{+path}","compare_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/merges","archive_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/downloads","issues_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues{/number}","pulls_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/labels{/name}","releases_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/releases{/id}","created_at":"2015-01-09T00:13:32Z","updated_at":"2015-01-30T18:15:56Z","pushed_at":"2015-01-31T00:26:54Z","git_url":"git://github.com/turingschool-projects/skill-inventory-rails.git","ssh_url":"git@github.com:turingschool-projects/skill-inventory-rails.git","clone_url":"https://github.com/turingschool-projects/skill-inventory-rails.git","svn_url":"https://github.com/turingschool-projects/skill-inventory-rails","homepage":null,"size":891,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":17,"forks":5,"open_issues":17,"watchers":0,"default_branch":"master"}},"base":{"label":"turingschool-projects:master","ref":"master","sha":"84b8729695d2e7251c67b8f44991d546ace85dd3","user":{"login":"turingschool-projects","id":10454571,"avatar_url":"https://avatars.githubusercontent.com/u/10454571?v=3","gravatar_id":"","url":"https://api.github.com/users/turingschool-projects","html_url":"https://github.com/turingschool-projects","followers_url":"https://api.github.com/users/turingschool-projects/followers","following_url":"https://api.github.com/users/turingschool-projects/following{/other_user}","gists_url":"https://api.github.com/users/turingschool-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/turingschool-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turingschool-projects/subscriptions","organizations_url":"https://api.github.com/users/turingschool-projects/orgs","repos_url":"https://api.github.com/users/turingschool-projects/repos","events_url":"https://api.github.com/users/turingschool-projects/events{/privacy}","received_events_url":"https://api.github.com/users/turingschool-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":28992701,"name":"skill-inventory-rails","full_name":"turingschool-projects/skill-inventory-rails","owner":{"login":"turingschool-projects","id":10454571,"avatar_url":"https://avatars.githubusercontent.com/u/10454571?v=3","gravatar_id":"","url":"https://api.github.com/users/turingschool-projects","html_url":"https://github.com/turingschool-projects","followers_url":"https://api.github.com/users/turingschool-projects/followers","following_url":"https://api.github.com/users/turingschool-projects/following{/other_user}","gists_url":"https://api.github.com/users/turingschool-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/turingschool-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turingschool-projects/subscriptions","organizations_url":"https://api.github.com/users/turingschool-projects/orgs","repos_url":"https://api.github.com/users/turingschool-projects/repos","events_url":"https://api.github.com/users/turingschool-projects/events{/privacy}","received_events_url":"https://api.github.com/users/turingschool-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/turingschool-projects/skill-inventory-rails","description":"","fork":false,"url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails","forks_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/forks","keys_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/teams","hooks_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/hooks","issue_events_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/events{/number}","events_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/events","assignees_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/assignees{/user}","branches_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/branches{/branch}","tags_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/tags","blobs_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/languages","stargazers_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/stargazers","contributors_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/contributors","subscribers_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/subscribers","subscription_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/subscription","commits_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/contents/{+path}","compare_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/merges","archive_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/downloads","issues_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues{/number}","pulls_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/labels{/name}","releases_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/releases{/id}","created_at":"2015-01-09T00:13:32Z","updated_at":"2015-01-30T18:15:56Z","pushed_at":"2015-01-31T00:26:54Z","git_url":"git://github.com/turingschool-projects/skill-inventory-rails.git","ssh_url":"git@github.com:turingschool-projects/skill-inventory-rails.git","clone_url":"https://github.com/turingschool-projects/skill-inventory-rails.git","svn_url":"https://github.com/turingschool-projects/skill-inventory-rails","homepage":null,"size":891,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":17,"forks":5,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/57"},"html":{"href":"https://github.com/turingschool-projects/skill-inventory-rails/pull/57"},"issue":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/57"},"comments":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/statuses/eafa2b10f827e8db338d0ae28d96cd98e09f09d9"}}}}