{"action":"created","comment":{"url":"https://api.github.com/repos/tmr08c/working_with_troy/pulls/comments/55110743","id":55110743,"diff_hunk":"@@ -0,0 +1,94 @@\n+require \"rails_helper\"\n+\n+# This spec was generated by rspec-rails when you ran the scaffold generator.\n+# It demonstrates how one might use RSpec to specify the controller code that\n+# was generated by Rails when you ran the scaffold generator.\n+#\n+# It assumes that the implementation code is generated by the rails scaffold\n+# generator.  If you are using any extension libraries to generate different\n+# controller code, this generated spec may or may not pass.\n+#\n+# It only uses APIs available in rails and/or rspec-rails.  There are a number\n+# of tools you can use to make these specs even more expressive, but we're\n+# sticking to rails and rspec-rails APIs to keep things simple and stable.\n+#\n+# Compared to earlier versions of this generator, there is very limited use of\n+# stubs and message expectations in this spec.  Stubs are only used when there\n+# is no simpler way to get a handle on the object needed for the example.\n+# Message expectations are only used when there is no simpler way to specify\n+# that an instance is receiving a specific message.\n+\n+RSpec.describe ReviewsController, type: :controller do\n+  # This should return the minimal set of values that should be in the session\n+  # in order to pass any filters (e.g. authentication) defined in\n+  # ReviewsController. Be sure to keep this updated too.\n+  let(:valid_session) { {} }\n+\n+  describe \"GET #index\" do\n+    it \"assigns all reviews as @reviews\" do\n+      review = FactoryGirl.create(:review)\n+      get :index, {}, valid_session\n+      expect(assigns(:reviews)).to eq([review])\n+    end\n+\n+    it \"should sort reviews by most recent first\" do\n+      old_review = FactoryGirl.create(:review, created_at: DateTime.yesterday)\n+      older_review = FactoryGirl.create(:review, created_at: DateTime.yesterday - 1.day)\n+      new_review = FactoryGirl.create(:review, created_at: DateTime.now)\n+\n+      get :index, {}, valid_session\n+      expect(assigns(:reviews)).to eq([new_review, old_review, older_review])\n+    end\n+  end\n+\n+  describe \"GET #new\" do\n+    it \"assigns a new review as @review\" do\n+      get :new, {}, valid_session\n+      expect(assigns(:review)).to be_a_new(Review)\n+    end\n+  end\n+\n+  describe \"POST #create\" do\n+    context \"with valid params\" do\n+      let(:valid_attributes) do\n+        {\n+          body: \"body\",\n+          name: \"name\",\n+          relationship: \"relationship\"\n+        }\n+      end\n+\n+      it \"creates a new Review\" do\n+        expect { post :create, {:review => valid_attributes}, valid_session }\n+          .to change(Review, :count)\n+          .by(1)\n+      end\n+\n+      it \"redirects to the created review\" do\n+        post :create, {:review => valid_attributes}, valid_session","path":"spec/controllers/reviews_controller_spec.rb","position":68,"original_position":68,"commit_id":"07f03fa54b5ef15aa15fc31ebb0a2a1297170397","original_commit_id":"07f03fa54b5ef15aa15fc31ebb0a2a1297170397","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Use the new Ruby 1.9 hash syntax.<br>Space inside { missing.<br>Space inside } missing.","created_at":"2016-03-05T01:05:04Z","updated_at":"2016-03-05T01:05:04Z","html_url":"https://github.com/tmr08c/working_with_troy/pull/1#discussion_r55110743","pull_request_url":"https://api.github.com/repos/tmr08c/working_with_troy/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/tmr08c/working_with_troy/pulls/comments/55110743"},"html":{"href":"https://github.com/tmr08c/working_with_troy/pull/1#discussion_r55110743"},"pull_request":{"href":"https://api.github.com/repos/tmr08c/working_with_troy/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/tmr08c/working_with_troy/pulls/1","id":61792243,"html_url":"https://github.com/tmr08c/working_with_troy/pull/1","diff_url":"https://github.com/tmr08c/working_with_troy/pull/1.diff","patch_url":"https://github.com/tmr08c/working_with_troy/pull/1.patch","issue_url":"https://api.github.com/repos/tmr08c/working_with_troy/issues/1","number":1,"state":"open","locked":false,"title":"Adds ability to leave a review.","user":{"login":"tmr08c","id":691365,"avatar_url":"https://avatars.githubusercontent.com/u/691365?v=3","gravatar_id":"","url":"https://api.github.com/users/tmr08c","html_url":"https://github.com/tmr08c","followers_url":"https://api.github.com/users/tmr08c/followers","following_url":"https://api.github.com/users/tmr08c/following{/other_user}","gists_url":"https://api.github.com/users/tmr08c/gists{/gist_id}","starred_url":"https://api.github.com/users/tmr08c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmr08c/subscriptions","organizations_url":"https://api.github.com/users/tmr08c/orgs","repos_url":"https://api.github.com/users/tmr08c/repos","events_url":"https://api.github.com/users/tmr08c/events{/privacy}","received_events_url":"https://api.github.com/users/tmr08c/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-03-05T00:37:19Z","updated_at":"2016-03-05T01:05:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"53d6a7d0b55bb2924b954a78c5ca9773cdaaed4c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tmr08c/working_with_troy/pulls/1/commits","review_comments_url":"https://api.github.com/repos/tmr08c/working_with_troy/pulls/1/comments","review_comment_url":"https://api.github.com/repos/tmr08c/working_with_troy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tmr08c/working_with_troy/issues/1/comments","statuses_url":"https://api.github.com/repos/tmr08c/working_with_troy/statuses/07f03fa54b5ef15aa15fc31ebb0a2a1297170397","head":{"label":"tmr08c:create_review","ref":"create_review","sha":"07f03fa54b5ef15aa15fc31ebb0a2a1297170397","user":{"login":"tmr08c","id":691365,"avatar_url":"https://avatars.githubusercontent.com/u/691365?v=3","gravatar_id":"","url":"https://api.github.com/users/tmr08c","html_url":"https://github.com/tmr08c","followers_url":"https://api.github.com/users/tmr08c/followers","following_url":"https://api.github.com/users/tmr08c/following{/other_user}","gists_url":"https://api.github.com/users/tmr08c/gists{/gist_id}","starred_url":"https://api.github.com/users/tmr08c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmr08c/subscriptions","organizations_url":"https://api.github.com/users/tmr08c/orgs","repos_url":"https://api.github.com/users/tmr08c/repos","events_url":"https://api.github.com/users/tmr08c/events{/privacy}","received_events_url":"https://api.github.com/users/tmr08c/received_events","type":"User","site_admin":false},"repo":{"id":52134677,"name":"working_with_troy","full_name":"tmr08c/working_with_troy","owner":{"login":"tmr08c","id":691365,"avatar_url":"https://avatars.githubusercontent.com/u/691365?v=3","gravatar_id":"","url":"https://api.github.com/users/tmr08c","html_url":"https://github.com/tmr08c","followers_url":"https://api.github.com/users/tmr08c/followers","following_url":"https://api.github.com/users/tmr08c/following{/other_user}","gists_url":"https://api.github.com/users/tmr08c/gists{/gist_id}","starred_url":"https://api.github.com/users/tmr08c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmr08c/subscriptions","organizations_url":"https://api.github.com/users/tmr08c/orgs","repos_url":"https://api.github.com/users/tmr08c/repos","events_url":"https://api.github.com/users/tmr08c/events{/privacy}","received_events_url":"https://api.github.com/users/tmr08c/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmr08c/working_with_troy","description":null,"fork":false,"url":"https://api.github.com/repos/tmr08c/working_with_troy","forks_url":"https://api.github.com/repos/tmr08c/working_with_troy/forks","keys_url":"https://api.github.com/repos/tmr08c/working_with_troy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmr08c/working_with_troy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmr08c/working_with_troy/teams","hooks_url":"https://api.github.com/repos/tmr08c/working_with_troy/hooks","issue_events_url":"https://api.github.com/repos/tmr08c/working_with_troy/issues/events{/number}","events_url":"https://api.github.com/repos/tmr08c/working_with_troy/events","assignees_url":"https://api.github.com/repos/tmr08c/working_with_troy/assignees{/user}","branches_url":"https://api.github.com/repos/tmr08c/working_with_troy/branches{/branch}","tags_url":"https://api.github.com/repos/tmr08c/working_with_troy/tags","blobs_url":"https://api.github.com/repos/tmr08c/working_with_troy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmr08c/working_with_troy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmr08c/working_with_troy/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmr08c/working_with_troy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmr08c/working_with_troy/statuses/{sha}","languages_url":"https://api.github.com/repos/tmr08c/working_with_troy/languages","stargazers_url":"https://api.github.com/repos/tmr08c/working_with_troy/stargazers","contributors_url":"https://api.github.com/repos/tmr08c/working_with_troy/contributors","subscribers_url":"https://api.github.com/repos/tmr08c/working_with_troy/subscribers","subscription_url":"https://api.github.com/repos/tmr08c/working_with_troy/subscription","commits_url":"https://api.github.com/repos/tmr08c/working_with_troy/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmr08c/working_with_troy/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmr08c/working_with_troy/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmr08c/working_with_troy/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmr08c/working_with_troy/contents/{+path}","compare_url":"https://api.github.com/repos/tmr08c/working_with_troy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmr08c/working_with_troy/merges","archive_url":"https://api.github.com/repos/tmr08c/working_with_troy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmr08c/working_with_troy/downloads","issues_url":"https://api.github.com/repos/tmr08c/working_with_troy/issues{/number}","pulls_url":"https://api.github.com/repos/tmr08c/working_with_troy/pulls{/number}","milestones_url":"https://api.github.com/repos/tmr08c/working_with_troy/milestones{/number}","notifications_url":"https://api.github.com/repos/tmr08c/working_with_troy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmr08c/working_with_troy/labels{/name}","releases_url":"https://api.github.com/repos/tmr08c/working_with_troy/releases{/id}","deployments_url":"https://api.github.com/repos/tmr08c/working_with_troy/deployments","created_at":"2016-02-20T03:37:51Z","updated_at":"2016-02-23T21:19:32Z","pushed_at":"2016-03-05T01:04:55Z","git_url":"git://github.com/tmr08c/working_with_troy.git","ssh_url":"git@github.com:tmr08c/working_with_troy.git","clone_url":"https://github.com/tmr08c/working_with_troy.git","svn_url":"https://github.com/tmr08c/working_with_troy","homepage":null,"size":59,"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":"tmr08c:master","ref":"master","sha":"6a470bb87d1e66b0731c15c5c7bf23135fe617c0","user":{"login":"tmr08c","id":691365,"avatar_url":"https://avatars.githubusercontent.com/u/691365?v=3","gravatar_id":"","url":"https://api.github.com/users/tmr08c","html_url":"https://github.com/tmr08c","followers_url":"https://api.github.com/users/tmr08c/followers","following_url":"https://api.github.com/users/tmr08c/following{/other_user}","gists_url":"https://api.github.com/users/tmr08c/gists{/gist_id}","starred_url":"https://api.github.com/users/tmr08c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmr08c/subscriptions","organizations_url":"https://api.github.com/users/tmr08c/orgs","repos_url":"https://api.github.com/users/tmr08c/repos","events_url":"https://api.github.com/users/tmr08c/events{/privacy}","received_events_url":"https://api.github.com/users/tmr08c/received_events","type":"User","site_admin":false},"repo":{"id":52134677,"name":"working_with_troy","full_name":"tmr08c/working_with_troy","owner":{"login":"tmr08c","id":691365,"avatar_url":"https://avatars.githubusercontent.com/u/691365?v=3","gravatar_id":"","url":"https://api.github.com/users/tmr08c","html_url":"https://github.com/tmr08c","followers_url":"https://api.github.com/users/tmr08c/followers","following_url":"https://api.github.com/users/tmr08c/following{/other_user}","gists_url":"https://api.github.com/users/tmr08c/gists{/gist_id}","starred_url":"https://api.github.com/users/tmr08c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmr08c/subscriptions","organizations_url":"https://api.github.com/users/tmr08c/orgs","repos_url":"https://api.github.com/users/tmr08c/repos","events_url":"https://api.github.com/users/tmr08c/events{/privacy}","received_events_url":"https://api.github.com/users/tmr08c/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmr08c/working_with_troy","description":null,"fork":false,"url":"https://api.github.com/repos/tmr08c/working_with_troy","forks_url":"https://api.github.com/repos/tmr08c/working_with_troy/forks","keys_url":"https://api.github.com/repos/tmr08c/working_with_troy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmr08c/working_with_troy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmr08c/working_with_troy/teams","hooks_url":"https://api.github.com/repos/tmr08c/working_with_troy/hooks","issue_events_url":"https://api.github.com/repos/tmr08c/working_with_troy/issues/events{/number}","events_url":"https://api.github.com/repos/tmr08c/working_with_troy/events","assignees_url":"https://api.github.com/repos/tmr08c/working_with_troy/assignees{/user}","branches_url":"https://api.github.com/repos/tmr08c/working_with_troy/branches{/branch}","tags_url":"https://api.github.com/repos/tmr08c/working_with_troy/tags","blobs_url":"https://api.github.com/repos/tmr08c/working_with_troy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmr08c/working_with_troy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmr08c/working_with_troy/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmr08c/working_with_troy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmr08c/working_with_troy/statuses/{sha}","languages_url":"https://api.github.com/repos/tmr08c/working_with_troy/languages","stargazers_url":"https://api.github.com/repos/tmr08c/working_with_troy/stargazers","contributors_url":"https://api.github.com/repos/tmr08c/working_with_troy/contributors","subscribers_url":"https://api.github.com/repos/tmr08c/working_with_troy/subscribers","subscription_url":"https://api.github.com/repos/tmr08c/working_with_troy/subscription","commits_url":"https://api.github.com/repos/tmr08c/working_with_troy/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmr08c/working_with_troy/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmr08c/working_with_troy/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmr08c/working_with_troy/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmr08c/working_with_troy/contents/{+path}","compare_url":"https://api.github.com/repos/tmr08c/working_with_troy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmr08c/working_with_troy/merges","archive_url":"https://api.github.com/repos/tmr08c/working_with_troy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmr08c/working_with_troy/downloads","issues_url":"https://api.github.com/repos/tmr08c/working_with_troy/issues{/number}","pulls_url":"https://api.github.com/repos/tmr08c/working_with_troy/pulls{/number}","milestones_url":"https://api.github.com/repos/tmr08c/working_with_troy/milestones{/number}","notifications_url":"https://api.github.com/repos/tmr08c/working_with_troy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmr08c/working_with_troy/labels{/name}","releases_url":"https://api.github.com/repos/tmr08c/working_with_troy/releases{/id}","deployments_url":"https://api.github.com/repos/tmr08c/working_with_troy/deployments","created_at":"2016-02-20T03:37:51Z","updated_at":"2016-02-23T21:19:32Z","pushed_at":"2016-03-05T01:04:55Z","git_url":"git://github.com/tmr08c/working_with_troy.git","ssh_url":"git@github.com:tmr08c/working_with_troy.git","clone_url":"https://github.com/tmr08c/working_with_troy.git","svn_url":"https://github.com/tmr08c/working_with_troy","homepage":null,"size":59,"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/tmr08c/working_with_troy/pulls/1"},"html":{"href":"https://github.com/tmr08c/working_with_troy/pull/1"},"issue":{"href":"https://api.github.com/repos/tmr08c/working_with_troy/issues/1"},"comments":{"href":"https://api.github.com/repos/tmr08c/working_with_troy/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/tmr08c/working_with_troy/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/tmr08c/working_with_troy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tmr08c/working_with_troy/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/tmr08c/working_with_troy/statuses/07f03fa54b5ef15aa15fc31ebb0a2a1297170397"}}}}