{"action":"created","comment":{"url":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls/comments/59043358","id":59043358,"diff_hunk":"@@ -0,0 +1,159 @@\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 TopicsController, type: :controller do\n+\n+  # This should return the minimal set of attributes required to create a valid\n+  # Topic. As you add validations to Topic, be sure to\n+  # adjust the attributes here as well.\n+  let(:valid_attributes) {\n+    skip(\"Add a hash of attributes valid for your model\")\n+  }\n+\n+  let(:invalid_attributes) {\n+    skip(\"Add a hash of attributes invalid for your model\")\n+  }\n+\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+  # TopicsController. Be sure to keep this updated too.\n+  let(:valid_session) { {} }\n+\n+  describe \"GET #index\" do\n+    it \"assigns all topics as @topics\" do\n+      topic = Topic.create! valid_attributes\n+      get :index, {}, valid_session\n+      expect(assigns(:topics)).to eq([topic])\n+    end\n+  end\n+\n+  describe \"GET #show\" do\n+    it \"assigns the requested topic as @topic\" do\n+      topic = Topic.create! valid_attributes\n+      get :show, {:id => topic.to_param}, valid_session\n+      expect(assigns(:topic)).to eq(topic)\n+    end\n+  end\n+\n+  describe \"GET #new\" do\n+    it \"assigns a new topic as @topic\" do\n+      get :new, {}, valid_session\n+      expect(assigns(:topic)).to be_a_new(Topic)\n+    end\n+  end\n+\n+  describe \"GET #edit\" do\n+    it \"assigns the requested topic as @topic\" do\n+      topic = Topic.create! valid_attributes\n+      get :edit, {:id => topic.to_param}, valid_session\n+      expect(assigns(:topic)).to eq(topic)\n+    end\n+  end\n+\n+  describe \"POST #create\" do\n+    context \"with valid params\" do\n+      it \"creates a new Topic\" do\n+        expect {\n+          post :create, {:topic => valid_attributes}, valid_session\n+        }.to change(Topic, :count).by(1)\n+      end\n+\n+      it \"assigns a newly created topic as @topic\" do\n+        post :create, {:topic => valid_attributes}, valid_session\n+        expect(assigns(:topic)).to be_a(Topic)\n+        expect(assigns(:topic)).to be_persisted\n+      end\n+\n+      it \"redirects to the created topic\" do\n+        post :create, {:topic => valid_attributes}, valid_session\n+        expect(response).to redirect_to(Topic.last)\n+      end\n+    end\n+\n+    context \"with invalid params\" do\n+      it \"assigns a newly created but unsaved topic as @topic\" do\n+        post :create, {:topic => invalid_attributes}, valid_session\n+        expect(assigns(:topic)).to be_a_new(Topic)\n+      end\n+\n+      it \"re-renders the 'new' template\" do\n+        post :create, {:topic => invalid_attributes}, valid_session\n+        expect(response).to render_template(\"new\")\n+      end\n+    end\n+  end\n+\n+  describe \"PUT #update\" do","path":"spec/controllers/topics_controller_spec.rb","position":103,"original_position":103,"commit_id":"f1c725586d22a42bd2962ea137faaefdcab8d326","original_commit_id":"f1c725586d22a42bd2962ea137faaefdcab8d326","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":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","created_at":"2016-04-08T15:31:42Z","updated_at":"2016-04-08T15:31:42Z","html_url":"https://github.com/farukcse/what_i_learned_today/pull/2#discussion_r59043358","pull_request_url":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls/comments/59043358"},"html":{"href":"https://github.com/farukcse/what_i_learned_today/pull/2#discussion_r59043358"},"pull_request":{"href":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls/2","id":65795438,"html_url":"https://github.com/farukcse/what_i_learned_today/pull/2","diff_url":"https://github.com/farukcse/what_i_learned_today/pull/2.diff","patch_url":"https://github.com/farukcse/what_i_learned_today/pull/2.patch","issue_url":"https://api.github.com/repos/farukcse/what_i_learned_today/issues/2","number":2,"state":"open","locked":false,"title":"#2 topic crud","user":{"login":"farukcse","id":5501491,"avatar_url":"https://avatars.githubusercontent.com/u/5501491?v=3","gravatar_id":"","url":"https://api.github.com/users/farukcse","html_url":"https://github.com/farukcse","followers_url":"https://api.github.com/users/farukcse/followers","following_url":"https://api.github.com/users/farukcse/following{/other_user}","gists_url":"https://api.github.com/users/farukcse/gists{/gist_id}","starred_url":"https://api.github.com/users/farukcse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farukcse/subscriptions","organizations_url":"https://api.github.com/users/farukcse/orgs","repos_url":"https://api.github.com/users/farukcse/repos","events_url":"https://api.github.com/users/farukcse/events{/privacy}","received_events_url":"https://api.github.com/users/farukcse/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-08T14:35:29Z","updated_at":"2016-04-08T15:31:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb01d3b9f7cd83e9150afec78de3004c91039d7f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls/2/commits","review_comments_url":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls/2/comments","review_comment_url":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls/comments{/number}","comments_url":"https://api.github.com/repos/farukcse/what_i_learned_today/issues/2/comments","statuses_url":"https://api.github.com/repos/farukcse/what_i_learned_today/statuses/f1c725586d22a42bd2962ea137faaefdcab8d326","head":{"label":"farukcse:#2-topic-crud","ref":"#2-topic-crud","sha":"f1c725586d22a42bd2962ea137faaefdcab8d326","user":{"login":"farukcse","id":5501491,"avatar_url":"https://avatars.githubusercontent.com/u/5501491?v=3","gravatar_id":"","url":"https://api.github.com/users/farukcse","html_url":"https://github.com/farukcse","followers_url":"https://api.github.com/users/farukcse/followers","following_url":"https://api.github.com/users/farukcse/following{/other_user}","gists_url":"https://api.github.com/users/farukcse/gists{/gist_id}","starred_url":"https://api.github.com/users/farukcse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farukcse/subscriptions","organizations_url":"https://api.github.com/users/farukcse/orgs","repos_url":"https://api.github.com/users/farukcse/repos","events_url":"https://api.github.com/users/farukcse/events{/privacy}","received_events_url":"https://api.github.com/users/farukcse/received_events","type":"User","site_admin":false},"repo":{"id":54696656,"name":"what_i_learned_today","full_name":"farukcse/what_i_learned_today","owner":{"login":"farukcse","id":5501491,"avatar_url":"https://avatars.githubusercontent.com/u/5501491?v=3","gravatar_id":"","url":"https://api.github.com/users/farukcse","html_url":"https://github.com/farukcse","followers_url":"https://api.github.com/users/farukcse/followers","following_url":"https://api.github.com/users/farukcse/following{/other_user}","gists_url":"https://api.github.com/users/farukcse/gists{/gist_id}","starred_url":"https://api.github.com/users/farukcse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farukcse/subscriptions","organizations_url":"https://api.github.com/users/farukcse/orgs","repos_url":"https://api.github.com/users/farukcse/repos","events_url":"https://api.github.com/users/farukcse/events{/privacy}","received_events_url":"https://api.github.com/users/farukcse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/farukcse/what_i_learned_today","description":"","fork":false,"url":"https://api.github.com/repos/farukcse/what_i_learned_today","forks_url":"https://api.github.com/repos/farukcse/what_i_learned_today/forks","keys_url":"https://api.github.com/repos/farukcse/what_i_learned_today/keys{/key_id}","collaborators_url":"https://api.github.com/repos/farukcse/what_i_learned_today/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/farukcse/what_i_learned_today/teams","hooks_url":"https://api.github.com/repos/farukcse/what_i_learned_today/hooks","issue_events_url":"https://api.github.com/repos/farukcse/what_i_learned_today/issues/events{/number}","events_url":"https://api.github.com/repos/farukcse/what_i_learned_today/events","assignees_url":"https://api.github.com/repos/farukcse/what_i_learned_today/assignees{/user}","branches_url":"https://api.github.com/repos/farukcse/what_i_learned_today/branches{/branch}","tags_url":"https://api.github.com/repos/farukcse/what_i_learned_today/tags","blobs_url":"https://api.github.com/repos/farukcse/what_i_learned_today/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/farukcse/what_i_learned_today/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/farukcse/what_i_learned_today/git/refs{/sha}","trees_url":"https://api.github.com/repos/farukcse/what_i_learned_today/git/trees{/sha}","statuses_url":"https://api.github.com/repos/farukcse/what_i_learned_today/statuses/{sha}","languages_url":"https://api.github.com/repos/farukcse/what_i_learned_today/languages","stargazers_url":"https://api.github.com/repos/farukcse/what_i_learned_today/stargazers","contributors_url":"https://api.github.com/repos/farukcse/what_i_learned_today/contributors","subscribers_url":"https://api.github.com/repos/farukcse/what_i_learned_today/subscribers","subscription_url":"https://api.github.com/repos/farukcse/what_i_learned_today/subscription","commits_url":"https://api.github.com/repos/farukcse/what_i_learned_today/commits{/sha}","git_commits_url":"https://api.github.com/repos/farukcse/what_i_learned_today/git/commits{/sha}","comments_url":"https://api.github.com/repos/farukcse/what_i_learned_today/comments{/number}","issue_comment_url":"https://api.github.com/repos/farukcse/what_i_learned_today/issues/comments{/number}","contents_url":"https://api.github.com/repos/farukcse/what_i_learned_today/contents/{+path}","compare_url":"https://api.github.com/repos/farukcse/what_i_learned_today/compare/{base}...{head}","merges_url":"https://api.github.com/repos/farukcse/what_i_learned_today/merges","archive_url":"https://api.github.com/repos/farukcse/what_i_learned_today/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/farukcse/what_i_learned_today/downloads","issues_url":"https://api.github.com/repos/farukcse/what_i_learned_today/issues{/number}","pulls_url":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls{/number}","milestones_url":"https://api.github.com/repos/farukcse/what_i_learned_today/milestones{/number}","notifications_url":"https://api.github.com/repos/farukcse/what_i_learned_today/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/farukcse/what_i_learned_today/labels{/name}","releases_url":"https://api.github.com/repos/farukcse/what_i_learned_today/releases{/id}","deployments_url":"https://api.github.com/repos/farukcse/what_i_learned_today/deployments","created_at":"2016-03-25T05:27:37Z","updated_at":"2016-04-06T16:53:32Z","pushed_at":"2016-04-08T15:31:36Z","git_url":"git://github.com/farukcse/what_i_learned_today.git","ssh_url":"git@github.com:farukcse/what_i_learned_today.git","clone_url":"https://github.com/farukcse/what_i_learned_today.git","svn_url":"https://github.com/farukcse/what_i_learned_today","homepage":null,"size":39,"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":"farukcse:master","ref":"master","sha":"d6f19ddc1232ad3d9456da27110852a874d315b9","user":{"login":"farukcse","id":5501491,"avatar_url":"https://avatars.githubusercontent.com/u/5501491?v=3","gravatar_id":"","url":"https://api.github.com/users/farukcse","html_url":"https://github.com/farukcse","followers_url":"https://api.github.com/users/farukcse/followers","following_url":"https://api.github.com/users/farukcse/following{/other_user}","gists_url":"https://api.github.com/users/farukcse/gists{/gist_id}","starred_url":"https://api.github.com/users/farukcse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farukcse/subscriptions","organizations_url":"https://api.github.com/users/farukcse/orgs","repos_url":"https://api.github.com/users/farukcse/repos","events_url":"https://api.github.com/users/farukcse/events{/privacy}","received_events_url":"https://api.github.com/users/farukcse/received_events","type":"User","site_admin":false},"repo":{"id":54696656,"name":"what_i_learned_today","full_name":"farukcse/what_i_learned_today","owner":{"login":"farukcse","id":5501491,"avatar_url":"https://avatars.githubusercontent.com/u/5501491?v=3","gravatar_id":"","url":"https://api.github.com/users/farukcse","html_url":"https://github.com/farukcse","followers_url":"https://api.github.com/users/farukcse/followers","following_url":"https://api.github.com/users/farukcse/following{/other_user}","gists_url":"https://api.github.com/users/farukcse/gists{/gist_id}","starred_url":"https://api.github.com/users/farukcse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farukcse/subscriptions","organizations_url":"https://api.github.com/users/farukcse/orgs","repos_url":"https://api.github.com/users/farukcse/repos","events_url":"https://api.github.com/users/farukcse/events{/privacy}","received_events_url":"https://api.github.com/users/farukcse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/farukcse/what_i_learned_today","description":"","fork":false,"url":"https://api.github.com/repos/farukcse/what_i_learned_today","forks_url":"https://api.github.com/repos/farukcse/what_i_learned_today/forks","keys_url":"https://api.github.com/repos/farukcse/what_i_learned_today/keys{/key_id}","collaborators_url":"https://api.github.com/repos/farukcse/what_i_learned_today/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/farukcse/what_i_learned_today/teams","hooks_url":"https://api.github.com/repos/farukcse/what_i_learned_today/hooks","issue_events_url":"https://api.github.com/repos/farukcse/what_i_learned_today/issues/events{/number}","events_url":"https://api.github.com/repos/farukcse/what_i_learned_today/events","assignees_url":"https://api.github.com/repos/farukcse/what_i_learned_today/assignees{/user}","branches_url":"https://api.github.com/repos/farukcse/what_i_learned_today/branches{/branch}","tags_url":"https://api.github.com/repos/farukcse/what_i_learned_today/tags","blobs_url":"https://api.github.com/repos/farukcse/what_i_learned_today/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/farukcse/what_i_learned_today/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/farukcse/what_i_learned_today/git/refs{/sha}","trees_url":"https://api.github.com/repos/farukcse/what_i_learned_today/git/trees{/sha}","statuses_url":"https://api.github.com/repos/farukcse/what_i_learned_today/statuses/{sha}","languages_url":"https://api.github.com/repos/farukcse/what_i_learned_today/languages","stargazers_url":"https://api.github.com/repos/farukcse/what_i_learned_today/stargazers","contributors_url":"https://api.github.com/repos/farukcse/what_i_learned_today/contributors","subscribers_url":"https://api.github.com/repos/farukcse/what_i_learned_today/subscribers","subscription_url":"https://api.github.com/repos/farukcse/what_i_learned_today/subscription","commits_url":"https://api.github.com/repos/farukcse/what_i_learned_today/commits{/sha}","git_commits_url":"https://api.github.com/repos/farukcse/what_i_learned_today/git/commits{/sha}","comments_url":"https://api.github.com/repos/farukcse/what_i_learned_today/comments{/number}","issue_comment_url":"https://api.github.com/repos/farukcse/what_i_learned_today/issues/comments{/number}","contents_url":"https://api.github.com/repos/farukcse/what_i_learned_today/contents/{+path}","compare_url":"https://api.github.com/repos/farukcse/what_i_learned_today/compare/{base}...{head}","merges_url":"https://api.github.com/repos/farukcse/what_i_learned_today/merges","archive_url":"https://api.github.com/repos/farukcse/what_i_learned_today/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/farukcse/what_i_learned_today/downloads","issues_url":"https://api.github.com/repos/farukcse/what_i_learned_today/issues{/number}","pulls_url":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls{/number}","milestones_url":"https://api.github.com/repos/farukcse/what_i_learned_today/milestones{/number}","notifications_url":"https://api.github.com/repos/farukcse/what_i_learned_today/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/farukcse/what_i_learned_today/labels{/name}","releases_url":"https://api.github.com/repos/farukcse/what_i_learned_today/releases{/id}","deployments_url":"https://api.github.com/repos/farukcse/what_i_learned_today/deployments","created_at":"2016-03-25T05:27:37Z","updated_at":"2016-04-06T16:53:32Z","pushed_at":"2016-04-08T15:31:36Z","git_url":"git://github.com/farukcse/what_i_learned_today.git","ssh_url":"git@github.com:farukcse/what_i_learned_today.git","clone_url":"https://github.com/farukcse/what_i_learned_today.git","svn_url":"https://github.com/farukcse/what_i_learned_today","homepage":null,"size":39,"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/farukcse/what_i_learned_today/pulls/2"},"html":{"href":"https://github.com/farukcse/what_i_learned_today/pull/2"},"issue":{"href":"https://api.github.com/repos/farukcse/what_i_learned_today/issues/2"},"comments":{"href":"https://api.github.com/repos/farukcse/what_i_learned_today/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/farukcse/what_i_learned_today/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/farukcse/what_i_learned_today/statuses/f1c725586d22a42bd2962ea137faaefdcab8d326"}}}}