{"action":"created","comment":{"url":"https://api.github.com/repos/wolox-training/mc-rails/pulls/comments/77158894","id":77158894,"diff_hunk":"@@ -0,0 +1,186 @@\n+require 'rails_helper'\n+\n+RSpec.describe ArticlesController, type: :controller do\n+  describe 'GET #index' do\n+    context 'when user is logged out' do\n+      let(:articles) { create_list(:article, 10) }\n+\n+      it 'shows all articles' do\n+        expect(articles.length).to eq(10)\n+      end\n+    end\n+  end\n+\n+  describe 'GET #show' do\n+    context 'when article exists' do\n+      let(:article) { create(:article) }\n+\n+      it 'assigns the requested article to @article' do\n+        get :show, params: { id: article.id }\n+        expect(assigns(:article)).to eq(article)\n+      end\n+\n+      it \"renders the #show view\" do\n+        get :show, params: { id: article.id }\n+        is_expected.to render_template :show\n+      end\n+    end\n+  end\n+\n+  describe 'GET #new' do\n+    it 'creates a new article' do\n+      get :new\n+      expect(assigns(:article)).to be_a_new(Article)\n+    end\n+\n+    it \"renders the #new view\" do\n+      get :new\n+      is_expected.to render_template :new\n+    end\n+  end\n+\n+  describe 'GET #edit' do\n+    let(:article) { create(:article) }\n+\n+    it 'edits an existing article' do\n+      get :edit, params: { id: article.id }\n+      expect(assigns(:article)).to eq(article)\n+    end\n+\n+    it \"renders the #edit view\" do\n+      get :edit, params: { id: article.id }\n+      is_expected.to render_template :edit\n+    end\n+  end\n+\n+  describe 'POST #create' do\n+    context 'when user is logged out' do","path":"spec/controllers/articles_controller_spec.rb","position":null,"original_position":57,"commit_id":"7bd221c08f258aa0fd38282effec650891030490","original_commit_id":"e8fb3b98adfce21c281694a66027a38e3825626f","user":{"login":"epintos","id":1047402,"avatar_url":"https://avatars.githubusercontent.com/u/1047402?v=3","gravatar_id":"","url":"https://api.github.com/users/epintos","html_url":"https://github.com/epintos","followers_url":"https://api.github.com/users/epintos/followers","following_url":"https://api.github.com/users/epintos/following{/other_user}","gists_url":"https://api.github.com/users/epintos/gists{/gist_id}","starred_url":"https://api.github.com/users/epintos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epintos/subscriptions","organizations_url":"https://api.github.com/users/epintos/orgs","repos_url":"https://api.github.com/users/epintos/repos","events_url":"https://api.github.com/users/epintos/events{/privacy}","received_events_url":"https://api.github.com/users/epintos/received_events","type":"User","site_admin":false},"body":"I think its okay to use more that one context if necessary. I think in this case wasn't so necessary","created_at":"2016-09-01T11:50:04Z","updated_at":"2016-09-01T11:50:04Z","html_url":"https://github.com/wolox-training/mc-rails/pull/5#discussion_r77158894","pull_request_url":"https://api.github.com/repos/wolox-training/mc-rails/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/wolox-training/mc-rails/pulls/comments/77158894"},"html":{"href":"https://github.com/wolox-training/mc-rails/pull/5#discussion_r77158894"},"pull_request":{"href":"https://api.github.com/repos/wolox-training/mc-rails/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/wolox-training/mc-rails/pulls/5","id":83533125,"html_url":"https://github.com/wolox-training/mc-rails/pull/5","diff_url":"https://github.com/wolox-training/mc-rails/pull/5.diff","patch_url":"https://github.com/wolox-training/mc-rails/pull/5.patch","issue_url":"https://api.github.com/repos/wolox-training/mc-rails/issues/5","number":5,"state":"open","locked":false,"title":"Rspec Tests","user":{"login":"MatiasComercioITBA","id":9677633,"avatar_url":"https://avatars.githubusercontent.com/u/9677633?v=3","gravatar_id":"","url":"https://api.github.com/users/MatiasComercioITBA","html_url":"https://github.com/MatiasComercioITBA","followers_url":"https://api.github.com/users/MatiasComercioITBA/followers","following_url":"https://api.github.com/users/MatiasComercioITBA/following{/other_user}","gists_url":"https://api.github.com/users/MatiasComercioITBA/gists{/gist_id}","starred_url":"https://api.github.com/users/MatiasComercioITBA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatiasComercioITBA/subscriptions","organizations_url":"https://api.github.com/users/MatiasComercioITBA/orgs","repos_url":"https://api.github.com/users/MatiasComercioITBA/repos","events_url":"https://api.github.com/users/MatiasComercioITBA/events{/privacy}","received_events_url":"https://api.github.com/users/MatiasComercioITBA/received_events","type":"User","site_admin":false},"body":"# Summary\r\n- Added - ArticlesController test cases.\r\n- Added - CommentsController test cases.\r\n- Added - rspec, shoulda matchers, database cleaner, faker & factory girl gems to make tests easier to write.\r\n\r\n# Trello Card\r\nhttps://trello.com/c/nyvX1Lia/12-crear-tests-con-rspec-de-modelos-y-controllers","created_at":"2016-08-31T21:30:11Z","updated_at":"2016-09-01T11:50:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8fcd41a4253bdcf2b287fa3bd03cf8d9e9be0be8","assignee":{"login":"epintos","id":1047402,"avatar_url":"https://avatars.githubusercontent.com/u/1047402?v=3","gravatar_id":"","url":"https://api.github.com/users/epintos","html_url":"https://github.com/epintos","followers_url":"https://api.github.com/users/epintos/followers","following_url":"https://api.github.com/users/epintos/following{/other_user}","gists_url":"https://api.github.com/users/epintos/gists{/gist_id}","starred_url":"https://api.github.com/users/epintos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epintos/subscriptions","organizations_url":"https://api.github.com/users/epintos/orgs","repos_url":"https://api.github.com/users/epintos/repos","events_url":"https://api.github.com/users/epintos/events{/privacy}","received_events_url":"https://api.github.com/users/epintos/received_events","type":"User","site_admin":false},"assignees":[{"login":"epintos","id":1047402,"avatar_url":"https://avatars.githubusercontent.com/u/1047402?v=3","gravatar_id":"","url":"https://api.github.com/users/epintos","html_url":"https://github.com/epintos","followers_url":"https://api.github.com/users/epintos/followers","following_url":"https://api.github.com/users/epintos/following{/other_user}","gists_url":"https://api.github.com/users/epintos/gists{/gist_id}","starred_url":"https://api.github.com/users/epintos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epintos/subscriptions","organizations_url":"https://api.github.com/users/epintos/orgs","repos_url":"https://api.github.com/users/epintos/repos","events_url":"https://api.github.com/users/epintos/events{/privacy}","received_events_url":"https://api.github.com/users/epintos/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/wolox-training/mc-rails/pulls/5/commits","review_comments_url":"https://api.github.com/repos/wolox-training/mc-rails/pulls/5/comments","review_comment_url":"https://api.github.com/repos/wolox-training/mc-rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wolox-training/mc-rails/issues/5/comments","statuses_url":"https://api.github.com/repos/wolox-training/mc-rails/statuses/7bd221c08f258aa0fd38282effec650891030490","head":{"label":"wolox-training:rspec","ref":"rspec","sha":"7bd221c08f258aa0fd38282effec650891030490","user":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":65819769,"name":"mc-rails","full_name":"wolox-training/mc-rails","owner":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wolox-training/mc-rails","description":"Training M.C.","fork":false,"url":"https://api.github.com/repos/wolox-training/mc-rails","forks_url":"https://api.github.com/repos/wolox-training/mc-rails/forks","keys_url":"https://api.github.com/repos/wolox-training/mc-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/mc-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/mc-rails/teams","hooks_url":"https://api.github.com/repos/wolox-training/mc-rails/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/mc-rails/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/mc-rails/events","assignees_url":"https://api.github.com/repos/wolox-training/mc-rails/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/mc-rails/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/mc-rails/tags","blobs_url":"https://api.github.com/repos/wolox-training/mc-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/mc-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/mc-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/mc-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/mc-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/mc-rails/languages","stargazers_url":"https://api.github.com/repos/wolox-training/mc-rails/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/mc-rails/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/mc-rails/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/mc-rails/subscription","commits_url":"https://api.github.com/repos/wolox-training/mc-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/mc-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/mc-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/mc-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/mc-rails/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/mc-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/mc-rails/merges","archive_url":"https://api.github.com/repos/wolox-training/mc-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/mc-rails/downloads","issues_url":"https://api.github.com/repos/wolox-training/mc-rails/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/mc-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/mc-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/mc-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/mc-rails/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/mc-rails/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/mc-rails/deployments","created_at":"2016-08-16T12:49:24Z","updated_at":"2016-08-23T18:50:42Z","pushed_at":"2016-09-01T04:58:15Z","git_url":"git://github.com/wolox-training/mc-rails.git","ssh_url":"git@github.com:wolox-training/mc-rails.git","clone_url":"https://github.com/wolox-training/mc-rails.git","svn_url":"https://github.com/wolox-training/mc-rails","homepage":null,"size":1376,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"wolox-training:master","ref":"master","sha":"2b224c6c72a219bd3c5066cb66bdb2d79e9cf212","user":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":65819769,"name":"mc-rails","full_name":"wolox-training/mc-rails","owner":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wolox-training/mc-rails","description":"Training M.C.","fork":false,"url":"https://api.github.com/repos/wolox-training/mc-rails","forks_url":"https://api.github.com/repos/wolox-training/mc-rails/forks","keys_url":"https://api.github.com/repos/wolox-training/mc-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/mc-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/mc-rails/teams","hooks_url":"https://api.github.com/repos/wolox-training/mc-rails/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/mc-rails/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/mc-rails/events","assignees_url":"https://api.github.com/repos/wolox-training/mc-rails/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/mc-rails/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/mc-rails/tags","blobs_url":"https://api.github.com/repos/wolox-training/mc-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/mc-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/mc-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/mc-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/mc-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/mc-rails/languages","stargazers_url":"https://api.github.com/repos/wolox-training/mc-rails/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/mc-rails/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/mc-rails/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/mc-rails/subscription","commits_url":"https://api.github.com/repos/wolox-training/mc-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/mc-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/mc-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/mc-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/mc-rails/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/mc-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/mc-rails/merges","archive_url":"https://api.github.com/repos/wolox-training/mc-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/mc-rails/downloads","issues_url":"https://api.github.com/repos/wolox-training/mc-rails/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/mc-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/mc-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/mc-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/mc-rails/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/mc-rails/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/mc-rails/deployments","created_at":"2016-08-16T12:49:24Z","updated_at":"2016-08-23T18:50:42Z","pushed_at":"2016-09-01T04:58:15Z","git_url":"git://github.com/wolox-training/mc-rails.git","ssh_url":"git@github.com:wolox-training/mc-rails.git","clone_url":"https://github.com/wolox-training/mc-rails.git","svn_url":"https://github.com/wolox-training/mc-rails","homepage":null,"size":1376,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wolox-training/mc-rails/pulls/5"},"html":{"href":"https://github.com/wolox-training/mc-rails/pull/5"},"issue":{"href":"https://api.github.com/repos/wolox-training/mc-rails/issues/5"},"comments":{"href":"https://api.github.com/repos/wolox-training/mc-rails/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/wolox-training/mc-rails/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/wolox-training/mc-rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wolox-training/mc-rails/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/wolox-training/mc-rails/statuses/7bd221c08f258aa0fd38282effec650891030490"}}}}
{"actor":{"display_login":"epintos"}}