{"action":"created","comment":{"url":"https://api.github.com/repos/dtdimond/myflix/pulls/comments/44876469","id":44876469,"diff_hunk":"@@ -39,6 +39,24 @@\n       end\n     end\n   end\n+\n+  describe 'GET show' do\n+    it 'sets @user' do\n+      set_current_user\n+      get :show, id: Fabricate(:user).id\n+      expect(assigns(:user)).to eq(User.second)","path":"spec/controllers/users_controller_spec.rb","position":9,"original_position":9,"commit_id":"420fcb2ba7a69fe8acc3c0308f8e9c728ffa1028","original_commit_id":"420fcb2ba7a69fe8acc3c0308f8e9c728ffa1028","user":{"login":"brandoncc","id":543973,"avatar_url":"https://avatars.githubusercontent.com/u/543973?v=3","gravatar_id":"","url":"https://api.github.com/users/brandoncc","html_url":"https://github.com/brandoncc","followers_url":"https://api.github.com/users/brandoncc/followers","following_url":"https://api.github.com/users/brandoncc/following{/other_user}","gists_url":"https://api.github.com/users/brandoncc/gists{/gist_id}","starred_url":"https://api.github.com/users/brandoncc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandoncc/subscriptions","organizations_url":"https://api.github.com/users/brandoncc/orgs","repos_url":"https://api.github.com/users/brandoncc/repos","events_url":"https://api.github.com/users/brandoncc/events{/privacy}","received_events_url":"https://api.github.com/users/brandoncc/received_events","type":"User","site_admin":false},"body":"A more explicit way to do this would be:\r\n\r\n```ruby\r\nit 'sets @user' do\r\n  set_current_user\r\n  alice = Fabricate(:user)\r\n  get :show, id: alice.id\r\n  expect(assigns(:user)).to eq(alice)\r\nend\r\n```\r\n\r\nThis gives a higher level on confidence in the spec since it is more explicit.","created_at":"2015-11-15T19:39:46Z","updated_at":"2015-11-15T19:39:46Z","html_url":"https://github.com/dtdimond/myflix/pull/5#discussion_r44876469","pull_request_url":"https://api.github.com/repos/dtdimond/myflix/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/dtdimond/myflix/pulls/comments/44876469"},"html":{"href":"https://github.com/dtdimond/myflix/pull/5#discussion_r44876469"},"pull_request":{"href":"https://api.github.com/repos/dtdimond/myflix/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/dtdimond/myflix/pulls/5","id":50750471,"html_url":"https://github.com/dtdimond/myflix/pull/5","diff_url":"https://github.com/dtdimond/myflix/pull/5.diff","patch_url":"https://github.com/dtdimond/myflix/pull/5.patch","issue_url":"https://api.github.com/repos/dtdimond/myflix/issues/5","number":5,"state":"open","locked":false,"title":"Add followers feature","user":{"login":"dtdimond","id":4264659,"avatar_url":"https://avatars.githubusercontent.com/u/4264659?v=3","gravatar_id":"","url":"https://api.github.com/users/dtdimond","html_url":"https://github.com/dtdimond","followers_url":"https://api.github.com/users/dtdimond/followers","following_url":"https://api.github.com/users/dtdimond/following{/other_user}","gists_url":"https://api.github.com/users/dtdimond/gists{/gist_id}","starred_url":"https://api.github.com/users/dtdimond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtdimond/subscriptions","organizations_url":"https://api.github.com/users/dtdimond/orgs","repos_url":"https://api.github.com/users/dtdimond/repos","events_url":"https://api.github.com/users/dtdimond/events{/privacy}","received_events_url":"https://api.github.com/users/dtdimond/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-15T16:51:41Z","updated_at":"2015-11-15T19:39:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c044c4f109e7c3deaf6fe01cf94ba26f92a0c56f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dtdimond/myflix/pulls/5/commits","review_comments_url":"https://api.github.com/repos/dtdimond/myflix/pulls/5/comments","review_comment_url":"https://api.github.com/repos/dtdimond/myflix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dtdimond/myflix/issues/5/comments","statuses_url":"https://api.github.com/repos/dtdimond/myflix/statuses/420fcb2ba7a69fe8acc3c0308f8e9c728ffa1028","head":{"label":"dtdimond:AddFollowersFeature","ref":"AddFollowersFeature","sha":"420fcb2ba7a69fe8acc3c0308f8e9c728ffa1028","user":{"login":"dtdimond","id":4264659,"avatar_url":"https://avatars.githubusercontent.com/u/4264659?v=3","gravatar_id":"","url":"https://api.github.com/users/dtdimond","html_url":"https://github.com/dtdimond","followers_url":"https://api.github.com/users/dtdimond/followers","following_url":"https://api.github.com/users/dtdimond/following{/other_user}","gists_url":"https://api.github.com/users/dtdimond/gists{/gist_id}","starred_url":"https://api.github.com/users/dtdimond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtdimond/subscriptions","organizations_url":"https://api.github.com/users/dtdimond/orgs","repos_url":"https://api.github.com/users/dtdimond/repos","events_url":"https://api.github.com/users/dtdimond/events{/privacy}","received_events_url":"https://api.github.com/users/dtdimond/received_events","type":"User","site_admin":false},"repo":{"id":43305136,"name":"myflix","full_name":"dtdimond/myflix","owner":{"login":"dtdimond","id":4264659,"avatar_url":"https://avatars.githubusercontent.com/u/4264659?v=3","gravatar_id":"","url":"https://api.github.com/users/dtdimond","html_url":"https://github.com/dtdimond","followers_url":"https://api.github.com/users/dtdimond/followers","following_url":"https://api.github.com/users/dtdimond/following{/other_user}","gists_url":"https://api.github.com/users/dtdimond/gists{/gist_id}","starred_url":"https://api.github.com/users/dtdimond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtdimond/subscriptions","organizations_url":"https://api.github.com/users/dtdimond/orgs","repos_url":"https://api.github.com/users/dtdimond/repos","events_url":"https://api.github.com/users/dtdimond/events{/privacy}","received_events_url":"https://api.github.com/users/dtdimond/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dtdimond/myflix","description":"","fork":false,"url":"https://api.github.com/repos/dtdimond/myflix","forks_url":"https://api.github.com/repos/dtdimond/myflix/forks","keys_url":"https://api.github.com/repos/dtdimond/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dtdimond/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dtdimond/myflix/teams","hooks_url":"https://api.github.com/repos/dtdimond/myflix/hooks","issue_events_url":"https://api.github.com/repos/dtdimond/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/dtdimond/myflix/events","assignees_url":"https://api.github.com/repos/dtdimond/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/dtdimond/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/dtdimond/myflix/tags","blobs_url":"https://api.github.com/repos/dtdimond/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dtdimond/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dtdimond/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/dtdimond/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dtdimond/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/dtdimond/myflix/languages","stargazers_url":"https://api.github.com/repos/dtdimond/myflix/stargazers","contributors_url":"https://api.github.com/repos/dtdimond/myflix/contributors","subscribers_url":"https://api.github.com/repos/dtdimond/myflix/subscribers","subscription_url":"https://api.github.com/repos/dtdimond/myflix/subscription","commits_url":"https://api.github.com/repos/dtdimond/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/dtdimond/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/dtdimond/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/dtdimond/myflix/issues/comments{/number}","contents_url":"https://api.github.com/repos/dtdimond/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/dtdimond/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dtdimond/myflix/merges","archive_url":"https://api.github.com/repos/dtdimond/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dtdimond/myflix/downloads","issues_url":"https://api.github.com/repos/dtdimond/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/dtdimond/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/dtdimond/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/dtdimond/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dtdimond/myflix/labels{/name}","releases_url":"https://api.github.com/repos/dtdimond/myflix/releases{/id}","created_at":"2015-09-28T14:15:37Z","updated_at":"2015-10-06T02:06:02Z","pushed_at":"2015-11-15T16:51:42Z","git_url":"git://github.com/dtdimond/myflix.git","ssh_url":"git@github.com:dtdimond/myflix.git","clone_url":"https://github.com/dtdimond/myflix.git","svn_url":"https://github.com/dtdimond/myflix","homepage":null,"size":456,"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":"dtdimond:master","ref":"master","sha":"953468a12022a39cc3575ad9f8af29a2fb1d013a","user":{"login":"dtdimond","id":4264659,"avatar_url":"https://avatars.githubusercontent.com/u/4264659?v=3","gravatar_id":"","url":"https://api.github.com/users/dtdimond","html_url":"https://github.com/dtdimond","followers_url":"https://api.github.com/users/dtdimond/followers","following_url":"https://api.github.com/users/dtdimond/following{/other_user}","gists_url":"https://api.github.com/users/dtdimond/gists{/gist_id}","starred_url":"https://api.github.com/users/dtdimond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtdimond/subscriptions","organizations_url":"https://api.github.com/users/dtdimond/orgs","repos_url":"https://api.github.com/users/dtdimond/repos","events_url":"https://api.github.com/users/dtdimond/events{/privacy}","received_events_url":"https://api.github.com/users/dtdimond/received_events","type":"User","site_admin":false},"repo":{"id":43305136,"name":"myflix","full_name":"dtdimond/myflix","owner":{"login":"dtdimond","id":4264659,"avatar_url":"https://avatars.githubusercontent.com/u/4264659?v=3","gravatar_id":"","url":"https://api.github.com/users/dtdimond","html_url":"https://github.com/dtdimond","followers_url":"https://api.github.com/users/dtdimond/followers","following_url":"https://api.github.com/users/dtdimond/following{/other_user}","gists_url":"https://api.github.com/users/dtdimond/gists{/gist_id}","starred_url":"https://api.github.com/users/dtdimond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtdimond/subscriptions","organizations_url":"https://api.github.com/users/dtdimond/orgs","repos_url":"https://api.github.com/users/dtdimond/repos","events_url":"https://api.github.com/users/dtdimond/events{/privacy}","received_events_url":"https://api.github.com/users/dtdimond/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dtdimond/myflix","description":"","fork":false,"url":"https://api.github.com/repos/dtdimond/myflix","forks_url":"https://api.github.com/repos/dtdimond/myflix/forks","keys_url":"https://api.github.com/repos/dtdimond/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dtdimond/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dtdimond/myflix/teams","hooks_url":"https://api.github.com/repos/dtdimond/myflix/hooks","issue_events_url":"https://api.github.com/repos/dtdimond/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/dtdimond/myflix/events","assignees_url":"https://api.github.com/repos/dtdimond/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/dtdimond/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/dtdimond/myflix/tags","blobs_url":"https://api.github.com/repos/dtdimond/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dtdimond/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dtdimond/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/dtdimond/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dtdimond/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/dtdimond/myflix/languages","stargazers_url":"https://api.github.com/repos/dtdimond/myflix/stargazers","contributors_url":"https://api.github.com/repos/dtdimond/myflix/contributors","subscribers_url":"https://api.github.com/repos/dtdimond/myflix/subscribers","subscription_url":"https://api.github.com/repos/dtdimond/myflix/subscription","commits_url":"https://api.github.com/repos/dtdimond/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/dtdimond/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/dtdimond/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/dtdimond/myflix/issues/comments{/number}","contents_url":"https://api.github.com/repos/dtdimond/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/dtdimond/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dtdimond/myflix/merges","archive_url":"https://api.github.com/repos/dtdimond/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dtdimond/myflix/downloads","issues_url":"https://api.github.com/repos/dtdimond/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/dtdimond/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/dtdimond/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/dtdimond/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dtdimond/myflix/labels{/name}","releases_url":"https://api.github.com/repos/dtdimond/myflix/releases{/id}","created_at":"2015-09-28T14:15:37Z","updated_at":"2015-10-06T02:06:02Z","pushed_at":"2015-11-15T16:51:42Z","git_url":"git://github.com/dtdimond/myflix.git","ssh_url":"git@github.com:dtdimond/myflix.git","clone_url":"https://github.com/dtdimond/myflix.git","svn_url":"https://github.com/dtdimond/myflix","homepage":null,"size":456,"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/dtdimond/myflix/pulls/5"},"html":{"href":"https://github.com/dtdimond/myflix/pull/5"},"issue":{"href":"https://api.github.com/repos/dtdimond/myflix/issues/5"},"comments":{"href":"https://api.github.com/repos/dtdimond/myflix/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/dtdimond/myflix/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/dtdimond/myflix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dtdimond/myflix/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/dtdimond/myflix/statuses/420fcb2ba7a69fe8acc3c0308f8e9c728ffa1028"}}}}