{"action":"created","comment":{"url":"https://api.github.com/repos/cdiaz19/blogspot/pulls/comments/38009152","id":38009152,"diff_hunk":"@@ -1,47 +1,75 @@\n require 'spec_helper'\n \n RSpec.describe ArticlesController, type: :controller do\n-  describe '#index' do\n-    describe 'show the list to articles saved' do\n+  describe 'GET #index' do\n+    it 'renders the index template' do\n+      get :index\n+      expect(response).to render_template(:index)\n     end\n   end\n \n-  describe '#show' do\n-    it 'show the articles' do\n+  describe 'GET #show' do\n+    let(:article) { FactoryGirl.create(:article) }\n+\n+    it 'assigns the article with a given id' do\n+      get :show, id: article.id\n+      expect(assigns(:article)).to eq(article)\n+    end\n+\n+    it 'renders the article view' do\n+      get :show, id: article.id\n+      expect(response).to render_template(:show)\n+    end\n+  end\n+\n+  describe 'GET #new'do\n+    let(:article) { FactoryGirl.build(:article) }\n+\n+    it 'assigns an article' do\n+      get :new\n+      expect(assigns(:article)).to be_a_new(Article)\n+    end\n+  end\n+\n+  describe 'POST #create' do\n+    let(:article) { FactoryGirl.create(:article)}\n+\n+    it 'renders the new artice' do\n+      post :create, title: article.title\n+                  , text: article.text\n+      expect(render(:article)).to be_a_new(Article)\n+    end\n+    it 'render the article view' do\n+      get :new, id: article.id\n+      expect(response).to render_template(:new)\n     end\n   end\n \n-  describe '#new'do\n-    it 'create new post' do\n+  describe 'PUT #update' do\n+    let(:article), { FactoryGirl.build(:article) }\n+\n+    it 'update the article with a given id' do\n+      put :update, id: article.id\n+      expect(response).to eq(article)\n+    end\n+    it 'finds the requested article' do\n+      put :update, title: article.title","path":"spec/controllers/articles_controller_spec.rb","position":62,"original_position":62,"commit_id":"e85b4fd50692fdec8d995db155c10db9e2269568","original_commit_id":"e85b4fd50692fdec8d995db155c10db9e2269568","user":{"login":"jramscr","id":2270737,"avatar_url":"https://avatars.githubusercontent.com/u/2270737?v=3","gravatar_id":"","url":"https://api.github.com/users/jramscr","html_url":"https://github.com/jramscr","followers_url":"https://api.github.com/users/jramscr/followers","following_url":"https://api.github.com/users/jramscr/following{/other_user}","gists_url":"https://api.github.com/users/jramscr/gists{/gist_id}","starred_url":"https://api.github.com/users/jramscr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jramscr/subscriptions","organizations_url":"https://api.github.com/users/jramscr/orgs","repos_url":"https://api.github.com/users/jramscr/repos","events_url":"https://api.github.com/users/jramscr/events{/privacy}","received_events_url":"https://api.github.com/users/jramscr/received_events","type":"User","site_admin":false},"body":"Lines length are good enough when they have 80 columns of length - `clean code` -, so here is unnecessary break this line. But it is a personal opinion. I feel comfortable with less than 100-120 columns length.\r\nwhen you break a line, the `,` should be in the previous line:\r\n\r\n```\r\nput :update, title: article.title,\r\n             text: article.text\r\n```","created_at":"2015-08-26T17:22:50Z","updated_at":"2015-08-26T17:22:50Z","html_url":"https://github.com/cdiaz19/blogspot/pull/1#discussion_r38009152","pull_request_url":"https://api.github.com/repos/cdiaz19/blogspot/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/cdiaz19/blogspot/pulls/comments/38009152"},"html":{"href":"https://github.com/cdiaz19/blogspot/pull/1#discussion_r38009152"},"pull_request":{"href":"https://api.github.com/repos/cdiaz19/blogspot/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/cdiaz19/blogspot/pulls/1","id":42379849,"html_url":"https://github.com/cdiaz19/blogspot/pull/1","diff_url":"https://github.com/cdiaz19/blogspot/pull/1.diff","patch_url":"https://github.com/cdiaz19/blogspot/pull/1.patch","issue_url":"https://api.github.com/repos/cdiaz19/blogspot/issues/1","number":1,"state":"open","locked":false,"title":"Refactor to update action on articles controller specs","user":{"login":"cdiaz19","id":13421423,"avatar_url":"https://avatars.githubusercontent.com/u/13421423?v=3","gravatar_id":"","url":"https://api.github.com/users/cdiaz19","html_url":"https://github.com/cdiaz19","followers_url":"https://api.github.com/users/cdiaz19/followers","following_url":"https://api.github.com/users/cdiaz19/following{/other_user}","gists_url":"https://api.github.com/users/cdiaz19/gists{/gist_id}","starred_url":"https://api.github.com/users/cdiaz19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdiaz19/subscriptions","organizations_url":"https://api.github.com/users/cdiaz19/orgs","repos_url":"https://api.github.com/users/cdiaz19/repos","events_url":"https://api.github.com/users/cdiaz19/events{/privacy}","received_events_url":"https://api.github.com/users/cdiaz19/received_events","type":"User","site_admin":false},"body":"Hi @jramscr,\r\n\r\nI Just make a minor change on the update action of the articles controller.\r\n\r\nCheers","created_at":"2015-08-13T18:02:09Z","updated_at":"2015-08-26T17:22:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bd830d6eaad8ca4cbc41f2077481b0391b70317","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cdiaz19/blogspot/pulls/1/commits","review_comments_url":"https://api.github.com/repos/cdiaz19/blogspot/pulls/1/comments","review_comment_url":"https://api.github.com/repos/cdiaz19/blogspot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cdiaz19/blogspot/issues/1/comments","statuses_url":"https://api.github.com/repos/cdiaz19/blogspot/statuses/e85b4fd50692fdec8d995db155c10db9e2269568","head":{"label":"cdiaz19:specs-refactor","ref":"specs-refactor","sha":"e85b4fd50692fdec8d995db155c10db9e2269568","user":{"login":"cdiaz19","id":13421423,"avatar_url":"https://avatars.githubusercontent.com/u/13421423?v=3","gravatar_id":"","url":"https://api.github.com/users/cdiaz19","html_url":"https://github.com/cdiaz19","followers_url":"https://api.github.com/users/cdiaz19/followers","following_url":"https://api.github.com/users/cdiaz19/following{/other_user}","gists_url":"https://api.github.com/users/cdiaz19/gists{/gist_id}","starred_url":"https://api.github.com/users/cdiaz19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdiaz19/subscriptions","organizations_url":"https://api.github.com/users/cdiaz19/orgs","repos_url":"https://api.github.com/users/cdiaz19/repos","events_url":"https://api.github.com/users/cdiaz19/events{/privacy}","received_events_url":"https://api.github.com/users/cdiaz19/received_events","type":"User","site_admin":false},"repo":{"id":40673326,"name":"blogspot","full_name":"cdiaz19/blogspot","owner":{"login":"cdiaz19","id":13421423,"avatar_url":"https://avatars.githubusercontent.com/u/13421423?v=3","gravatar_id":"","url":"https://api.github.com/users/cdiaz19","html_url":"https://github.com/cdiaz19","followers_url":"https://api.github.com/users/cdiaz19/followers","following_url":"https://api.github.com/users/cdiaz19/following{/other_user}","gists_url":"https://api.github.com/users/cdiaz19/gists{/gist_id}","starred_url":"https://api.github.com/users/cdiaz19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdiaz19/subscriptions","organizations_url":"https://api.github.com/users/cdiaz19/orgs","repos_url":"https://api.github.com/users/cdiaz19/repos","events_url":"https://api.github.com/users/cdiaz19/events{/privacy}","received_events_url":"https://api.github.com/users/cdiaz19/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cdiaz19/blogspot","description":"","fork":false,"url":"https://api.github.com/repos/cdiaz19/blogspot","forks_url":"https://api.github.com/repos/cdiaz19/blogspot/forks","keys_url":"https://api.github.com/repos/cdiaz19/blogspot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cdiaz19/blogspot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cdiaz19/blogspot/teams","hooks_url":"https://api.github.com/repos/cdiaz19/blogspot/hooks","issue_events_url":"https://api.github.com/repos/cdiaz19/blogspot/issues/events{/number}","events_url":"https://api.github.com/repos/cdiaz19/blogspot/events","assignees_url":"https://api.github.com/repos/cdiaz19/blogspot/assignees{/user}","branches_url":"https://api.github.com/repos/cdiaz19/blogspot/branches{/branch}","tags_url":"https://api.github.com/repos/cdiaz19/blogspot/tags","blobs_url":"https://api.github.com/repos/cdiaz19/blogspot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cdiaz19/blogspot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cdiaz19/blogspot/git/refs{/sha}","trees_url":"https://api.github.com/repos/cdiaz19/blogspot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cdiaz19/blogspot/statuses/{sha}","languages_url":"https://api.github.com/repos/cdiaz19/blogspot/languages","stargazers_url":"https://api.github.com/repos/cdiaz19/blogspot/stargazers","contributors_url":"https://api.github.com/repos/cdiaz19/blogspot/contributors","subscribers_url":"https://api.github.com/repos/cdiaz19/blogspot/subscribers","subscription_url":"https://api.github.com/repos/cdiaz19/blogspot/subscription","commits_url":"https://api.github.com/repos/cdiaz19/blogspot/commits{/sha}","git_commits_url":"https://api.github.com/repos/cdiaz19/blogspot/git/commits{/sha}","comments_url":"https://api.github.com/repos/cdiaz19/blogspot/comments{/number}","issue_comment_url":"https://api.github.com/repos/cdiaz19/blogspot/issues/comments{/number}","contents_url":"https://api.github.com/repos/cdiaz19/blogspot/contents/{+path}","compare_url":"https://api.github.com/repos/cdiaz19/blogspot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cdiaz19/blogspot/merges","archive_url":"https://api.github.com/repos/cdiaz19/blogspot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cdiaz19/blogspot/downloads","issues_url":"https://api.github.com/repos/cdiaz19/blogspot/issues{/number}","pulls_url":"https://api.github.com/repos/cdiaz19/blogspot/pulls{/number}","milestones_url":"https://api.github.com/repos/cdiaz19/blogspot/milestones{/number}","notifications_url":"https://api.github.com/repos/cdiaz19/blogspot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cdiaz19/blogspot/labels{/name}","releases_url":"https://api.github.com/repos/cdiaz19/blogspot/releases{/id}","created_at":"2015-08-13T17:48:16Z","updated_at":"2015-08-13T17:50:28Z","pushed_at":"2015-08-26T17:08:10Z","git_url":"git://github.com/cdiaz19/blogspot.git","ssh_url":"git@github.com:cdiaz19/blogspot.git","clone_url":"https://github.com/cdiaz19/blogspot.git","svn_url":"https://github.com/cdiaz19/blogspot","homepage":null,"size":168,"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":"cdiaz19:master","ref":"master","sha":"61daad9a86749a425abae070587d94737080e730","user":{"login":"cdiaz19","id":13421423,"avatar_url":"https://avatars.githubusercontent.com/u/13421423?v=3","gravatar_id":"","url":"https://api.github.com/users/cdiaz19","html_url":"https://github.com/cdiaz19","followers_url":"https://api.github.com/users/cdiaz19/followers","following_url":"https://api.github.com/users/cdiaz19/following{/other_user}","gists_url":"https://api.github.com/users/cdiaz19/gists{/gist_id}","starred_url":"https://api.github.com/users/cdiaz19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdiaz19/subscriptions","organizations_url":"https://api.github.com/users/cdiaz19/orgs","repos_url":"https://api.github.com/users/cdiaz19/repos","events_url":"https://api.github.com/users/cdiaz19/events{/privacy}","received_events_url":"https://api.github.com/users/cdiaz19/received_events","type":"User","site_admin":false},"repo":{"id":40673326,"name":"blogspot","full_name":"cdiaz19/blogspot","owner":{"login":"cdiaz19","id":13421423,"avatar_url":"https://avatars.githubusercontent.com/u/13421423?v=3","gravatar_id":"","url":"https://api.github.com/users/cdiaz19","html_url":"https://github.com/cdiaz19","followers_url":"https://api.github.com/users/cdiaz19/followers","following_url":"https://api.github.com/users/cdiaz19/following{/other_user}","gists_url":"https://api.github.com/users/cdiaz19/gists{/gist_id}","starred_url":"https://api.github.com/users/cdiaz19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdiaz19/subscriptions","organizations_url":"https://api.github.com/users/cdiaz19/orgs","repos_url":"https://api.github.com/users/cdiaz19/repos","events_url":"https://api.github.com/users/cdiaz19/events{/privacy}","received_events_url":"https://api.github.com/users/cdiaz19/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cdiaz19/blogspot","description":"","fork":false,"url":"https://api.github.com/repos/cdiaz19/blogspot","forks_url":"https://api.github.com/repos/cdiaz19/blogspot/forks","keys_url":"https://api.github.com/repos/cdiaz19/blogspot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cdiaz19/blogspot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cdiaz19/blogspot/teams","hooks_url":"https://api.github.com/repos/cdiaz19/blogspot/hooks","issue_events_url":"https://api.github.com/repos/cdiaz19/blogspot/issues/events{/number}","events_url":"https://api.github.com/repos/cdiaz19/blogspot/events","assignees_url":"https://api.github.com/repos/cdiaz19/blogspot/assignees{/user}","branches_url":"https://api.github.com/repos/cdiaz19/blogspot/branches{/branch}","tags_url":"https://api.github.com/repos/cdiaz19/blogspot/tags","blobs_url":"https://api.github.com/repos/cdiaz19/blogspot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cdiaz19/blogspot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cdiaz19/blogspot/git/refs{/sha}","trees_url":"https://api.github.com/repos/cdiaz19/blogspot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cdiaz19/blogspot/statuses/{sha}","languages_url":"https://api.github.com/repos/cdiaz19/blogspot/languages","stargazers_url":"https://api.github.com/repos/cdiaz19/blogspot/stargazers","contributors_url":"https://api.github.com/repos/cdiaz19/blogspot/contributors","subscribers_url":"https://api.github.com/repos/cdiaz19/blogspot/subscribers","subscription_url":"https://api.github.com/repos/cdiaz19/blogspot/subscription","commits_url":"https://api.github.com/repos/cdiaz19/blogspot/commits{/sha}","git_commits_url":"https://api.github.com/repos/cdiaz19/blogspot/git/commits{/sha}","comments_url":"https://api.github.com/repos/cdiaz19/blogspot/comments{/number}","issue_comment_url":"https://api.github.com/repos/cdiaz19/blogspot/issues/comments{/number}","contents_url":"https://api.github.com/repos/cdiaz19/blogspot/contents/{+path}","compare_url":"https://api.github.com/repos/cdiaz19/blogspot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cdiaz19/blogspot/merges","archive_url":"https://api.github.com/repos/cdiaz19/blogspot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cdiaz19/blogspot/downloads","issues_url":"https://api.github.com/repos/cdiaz19/blogspot/issues{/number}","pulls_url":"https://api.github.com/repos/cdiaz19/blogspot/pulls{/number}","milestones_url":"https://api.github.com/repos/cdiaz19/blogspot/milestones{/number}","notifications_url":"https://api.github.com/repos/cdiaz19/blogspot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cdiaz19/blogspot/labels{/name}","releases_url":"https://api.github.com/repos/cdiaz19/blogspot/releases{/id}","created_at":"2015-08-13T17:48:16Z","updated_at":"2015-08-13T17:50:28Z","pushed_at":"2015-08-26T17:08:10Z","git_url":"git://github.com/cdiaz19/blogspot.git","ssh_url":"git@github.com:cdiaz19/blogspot.git","clone_url":"https://github.com/cdiaz19/blogspot.git","svn_url":"https://github.com/cdiaz19/blogspot","homepage":null,"size":168,"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/cdiaz19/blogspot/pulls/1"},"html":{"href":"https://github.com/cdiaz19/blogspot/pull/1"},"issue":{"href":"https://api.github.com/repos/cdiaz19/blogspot/issues/1"},"comments":{"href":"https://api.github.com/repos/cdiaz19/blogspot/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/cdiaz19/blogspot/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/cdiaz19/blogspot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cdiaz19/blogspot/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/cdiaz19/blogspot/statuses/e85b4fd50692fdec8d995db155c10db9e2269568"}}}}