{"action":"created","comment":{"url":"https://api.github.com/repos/csci-qa/calculator/pulls/comments/42310294","id":42310294,"diff_hunk":"@@ -24,4 +24,82 @@\n     end\n   end\n   \n+  describe \"#subtract\" do\n+    it \"returns an integer\" do\n+      expect(calc.subtract 1, 1).to be_an Integer\n+    end\n+\t\n+   it \"is dependent on the operation order\" do\n+      expect(calc.subtract 1, 2).not_to eq calc.subtract(2, 1)\n+    end\n+\n+    context \"when subtracting zero from an integer\" do\n+      it \"returns the integer\" do\n+        expect(calc.subtract 4, 0).to eq 4\n+      end\n+    end\n+\t\n+\tcontext \"when subtracting an integer from itself\" do\n+\t\tit \"returns zero\" do\n+\t\t\texpect(calc.subtract 3,3).to eq 0\n+\t\tend\n+\tend\n+ \n+    it \"accepts more than 2 arguments\" do\n+      expect(calc.subtract 2, 4, 3).to eq -5\n+    end\n+  end\n+  \n+  describe \"#multiply\" do\n+    it \"returns an integer\" do\n+      expect(calc.multiply 1, 7).to be_an Integer\n+    end\n+\t\n+   it \"is not dependent on the operation order\" do\n+      expect(calc.multiply 3, 2).to eq calc.multiply(2, 3)\n+    end\n+\n+    context \"when multiplying by one\" do\n+      it \"returns the other integer\" do\n+        expect(calc.multiply 6, 1).to eq 6\n+      end\n+    end\n+\t\n+\tcontext \"when multiplying by zero\" do\n+\t\tit \"returns zero\" do\n+\t\t\texpect(calc.multiply 5,0).to eq 0\n+\t\tend\n+\tend\n+ \n+    it \"accepts more than 2 arguments\" do\n+      expect(calc.multiply 2, 5, 3).to eq 30\n+    end\n+  end\n+\n+  describe \"#divide\" do\n+    it \"returns an integer\" do\n+      expect(calc.divide 2, 3).to be_an Integer\n+    end\n+\t\n+   it \"is dependent on the operation order\" do\n+      expect(calc.divide 5, 2).not_to eq calc.divide(2, 5)\n+    end\n+\n+    context \"when dividing by one\" do\n+      it \"returns the first integer\" do\n+        expect(calc.divide 9, 1).to eq 9\n+      end\n+    end\n+\t\n+\tcontext \"when dividing by zero\" do\n+\t\tit \"raise an error\" do\n+\t\t\texpect{calc.divide 8,0}.to raise_exception","path":"spec/calculator_spec.rb","position":73,"original_position":73,"commit_id":"32b239e88f91f77f62b3af5f8656f40b3a8e0365","original_commit_id":"32b239e88f91f77f62b3af5f8656f40b3a8e0365","user":{"login":"jdenen","id":4671695,"avatar_url":"https://avatars.githubusercontent.com/u/4671695?v=3","gravatar_id":"","url":"https://api.github.com/users/jdenen","html_url":"https://github.com/jdenen","followers_url":"https://api.github.com/users/jdenen/followers","following_url":"https://api.github.com/users/jdenen/following{/other_user}","gists_url":"https://api.github.com/users/jdenen/gists{/gist_id}","starred_url":"https://api.github.com/users/jdenen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdenen/subscriptions","organizations_url":"https://api.github.com/users/jdenen/orgs","repos_url":"https://api.github.com/users/jdenen/repos","events_url":"https://api.github.com/users/jdenen/events{/privacy}","received_events_url":"https://api.github.com/users/jdenen/received_events","type":"User","site_admin":false},"body":"You can specify what kind of error that you expect, which makes your test more legitimate. \r\n\r\n```ruby\r\nexpect{ calc.divide 8, 0 }.to raise_error(ZeroDivisionError)\r\n```\r\nYour test would pass for a NoMethodError, RuntimeError, etc. So there's room for improvement there.","created_at":"2015-10-17T15:19:40Z","updated_at":"2015-10-17T15:19:40Z","html_url":"https://github.com/csci-qa/calculator/pull/1#discussion_r42310294","pull_request_url":"https://api.github.com/repos/csci-qa/calculator/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/csci-qa/calculator/pulls/comments/42310294"},"html":{"href":"https://github.com/csci-qa/calculator/pull/1#discussion_r42310294"},"pull_request":{"href":"https://api.github.com/repos/csci-qa/calculator/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/csci-qa/calculator/pulls/1","id":44309313,"html_url":"https://github.com/csci-qa/calculator/pull/1","diff_url":"https://github.com/csci-qa/calculator/pull/1.diff","patch_url":"https://github.com/csci-qa/calculator/pull/1.patch","issue_url":"https://api.github.com/repos/csci-qa/calculator/issues/1","number":1,"state":"open","locked":false,"title":"Calculator","user":{"login":"jvergara86","id":14101739,"avatar_url":"https://avatars.githubusercontent.com/u/14101739?v=3","gravatar_id":"","url":"https://api.github.com/users/jvergara86","html_url":"https://github.com/jvergara86","followers_url":"https://api.github.com/users/jvergara86/followers","following_url":"https://api.github.com/users/jvergara86/following{/other_user}","gists_url":"https://api.github.com/users/jvergara86/gists{/gist_id}","starred_url":"https://api.github.com/users/jvergara86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvergara86/subscriptions","organizations_url":"https://api.github.com/users/jvergara86/orgs","repos_url":"https://api.github.com/users/jvergara86/repos","events_url":"https://api.github.com/users/jvergara86/events{/privacy}","received_events_url":"https://api.github.com/users/jvergara86/received_events","type":"User","site_admin":false},"body":"I emailed you about the subtraction and division test already. I thought I would request a pull so that you could look at the code yourself. Also, I kept getting a warning with my raise_exception command saying that by not naming a specific error or providing a message it could lead to a false positive. However, I tried everything I could find online and nothing was working. If you could take a look and let me know if there is anything I could do to fix it I would appreciate it.\r\n\r\n-Joseph Vergara","created_at":"2015-09-06T20:28:59Z","updated_at":"2015-10-17T15:19:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba8d47f7fd22241632fc4a8aea8180596d3d96a4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/csci-qa/calculator/pulls/1/commits","review_comments_url":"https://api.github.com/repos/csci-qa/calculator/pulls/1/comments","review_comment_url":"https://api.github.com/repos/csci-qa/calculator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/csci-qa/calculator/issues/1/comments","statuses_url":"https://api.github.com/repos/csci-qa/calculator/statuses/32b239e88f91f77f62b3af5f8656f40b3a8e0365","head":{"label":"jvergara86:master","ref":"master","sha":"32b239e88f91f77f62b3af5f8656f40b3a8e0365","user":{"login":"jvergara86","id":14101739,"avatar_url":"https://avatars.githubusercontent.com/u/14101739?v=3","gravatar_id":"","url":"https://api.github.com/users/jvergara86","html_url":"https://github.com/jvergara86","followers_url":"https://api.github.com/users/jvergara86/followers","following_url":"https://api.github.com/users/jvergara86/following{/other_user}","gists_url":"https://api.github.com/users/jvergara86/gists{/gist_id}","starred_url":"https://api.github.com/users/jvergara86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvergara86/subscriptions","organizations_url":"https://api.github.com/users/jvergara86/orgs","repos_url":"https://api.github.com/users/jvergara86/repos","events_url":"https://api.github.com/users/jvergara86/events{/privacy}","received_events_url":"https://api.github.com/users/jvergara86/received_events","type":"User","site_admin":false},"repo":{"id":42014206,"name":"calculator","full_name":"jvergara86/calculator","owner":{"login":"jvergara86","id":14101739,"avatar_url":"https://avatars.githubusercontent.com/u/14101739?v=3","gravatar_id":"","url":"https://api.github.com/users/jvergara86","html_url":"https://github.com/jvergara86","followers_url":"https://api.github.com/users/jvergara86/followers","following_url":"https://api.github.com/users/jvergara86/following{/other_user}","gists_url":"https://api.github.com/users/jvergara86/gists{/gist_id}","starred_url":"https://api.github.com/users/jvergara86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvergara86/subscriptions","organizations_url":"https://api.github.com/users/jvergara86/orgs","repos_url":"https://api.github.com/users/jvergara86/repos","events_url":"https://api.github.com/users/jvergara86/events{/privacy}","received_events_url":"https://api.github.com/users/jvergara86/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jvergara86/calculator","description":"A kata to introduce TDD, RSpec, and Cucumber","fork":true,"url":"https://api.github.com/repos/jvergara86/calculator","forks_url":"https://api.github.com/repos/jvergara86/calculator/forks","keys_url":"https://api.github.com/repos/jvergara86/calculator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jvergara86/calculator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jvergara86/calculator/teams","hooks_url":"https://api.github.com/repos/jvergara86/calculator/hooks","issue_events_url":"https://api.github.com/repos/jvergara86/calculator/issues/events{/number}","events_url":"https://api.github.com/repos/jvergara86/calculator/events","assignees_url":"https://api.github.com/repos/jvergara86/calculator/assignees{/user}","branches_url":"https://api.github.com/repos/jvergara86/calculator/branches{/branch}","tags_url":"https://api.github.com/repos/jvergara86/calculator/tags","blobs_url":"https://api.github.com/repos/jvergara86/calculator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jvergara86/calculator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jvergara86/calculator/git/refs{/sha}","trees_url":"https://api.github.com/repos/jvergara86/calculator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jvergara86/calculator/statuses/{sha}","languages_url":"https://api.github.com/repos/jvergara86/calculator/languages","stargazers_url":"https://api.github.com/repos/jvergara86/calculator/stargazers","contributors_url":"https://api.github.com/repos/jvergara86/calculator/contributors","subscribers_url":"https://api.github.com/repos/jvergara86/calculator/subscribers","subscription_url":"https://api.github.com/repos/jvergara86/calculator/subscription","commits_url":"https://api.github.com/repos/jvergara86/calculator/commits{/sha}","git_commits_url":"https://api.github.com/repos/jvergara86/calculator/git/commits{/sha}","comments_url":"https://api.github.com/repos/jvergara86/calculator/comments{/number}","issue_comment_url":"https://api.github.com/repos/jvergara86/calculator/issues/comments{/number}","contents_url":"https://api.github.com/repos/jvergara86/calculator/contents/{+path}","compare_url":"https://api.github.com/repos/jvergara86/calculator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jvergara86/calculator/merges","archive_url":"https://api.github.com/repos/jvergara86/calculator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jvergara86/calculator/downloads","issues_url":"https://api.github.com/repos/jvergara86/calculator/issues{/number}","pulls_url":"https://api.github.com/repos/jvergara86/calculator/pulls{/number}","milestones_url":"https://api.github.com/repos/jvergara86/calculator/milestones{/number}","notifications_url":"https://api.github.com/repos/jvergara86/calculator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jvergara86/calculator/labels{/name}","releases_url":"https://api.github.com/repos/jvergara86/calculator/releases{/id}","created_at":"2015-09-06T18:47:52Z","updated_at":"2015-09-06T18:47:52Z","pushed_at":"2015-09-06T20:16:41Z","git_url":"git://github.com/jvergara86/calculator.git","ssh_url":"git@github.com:jvergara86/calculator.git","clone_url":"https://github.com/jvergara86/calculator.git","svn_url":"https://github.com/jvergara86/calculator","homepage":null,"size":86,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"csci-qa:joseph-vergara","ref":"joseph-vergara","sha":"d3b685c9c5768d8a54d7a433850816abf44ccbc6","user":{"login":"csci-qa","id":13578923,"avatar_url":"https://avatars.githubusercontent.com/u/13578923?v=3","gravatar_id":"","url":"https://api.github.com/users/csci-qa","html_url":"https://github.com/csci-qa","followers_url":"https://api.github.com/users/csci-qa/followers","following_url":"https://api.github.com/users/csci-qa/following{/other_user}","gists_url":"https://api.github.com/users/csci-qa/gists{/gist_id}","starred_url":"https://api.github.com/users/csci-qa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csci-qa/subscriptions","organizations_url":"https://api.github.com/users/csci-qa/orgs","repos_url":"https://api.github.com/users/csci-qa/repos","events_url":"https://api.github.com/users/csci-qa/events{/privacy}","received_events_url":"https://api.github.com/users/csci-qa/received_events","type":"Organization","site_admin":false},"repo":{"id":39975566,"name":"calculator","full_name":"csci-qa/calculator","owner":{"login":"csci-qa","id":13578923,"avatar_url":"https://avatars.githubusercontent.com/u/13578923?v=3","gravatar_id":"","url":"https://api.github.com/users/csci-qa","html_url":"https://github.com/csci-qa","followers_url":"https://api.github.com/users/csci-qa/followers","following_url":"https://api.github.com/users/csci-qa/following{/other_user}","gists_url":"https://api.github.com/users/csci-qa/gists{/gist_id}","starred_url":"https://api.github.com/users/csci-qa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csci-qa/subscriptions","organizations_url":"https://api.github.com/users/csci-qa/orgs","repos_url":"https://api.github.com/users/csci-qa/repos","events_url":"https://api.github.com/users/csci-qa/events{/privacy}","received_events_url":"https://api.github.com/users/csci-qa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/csci-qa/calculator","description":"A kata to introduce TDD, RSpec, and Cucumber","fork":false,"url":"https://api.github.com/repos/csci-qa/calculator","forks_url":"https://api.github.com/repos/csci-qa/calculator/forks","keys_url":"https://api.github.com/repos/csci-qa/calculator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/csci-qa/calculator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/csci-qa/calculator/teams","hooks_url":"https://api.github.com/repos/csci-qa/calculator/hooks","issue_events_url":"https://api.github.com/repos/csci-qa/calculator/issues/events{/number}","events_url":"https://api.github.com/repos/csci-qa/calculator/events","assignees_url":"https://api.github.com/repos/csci-qa/calculator/assignees{/user}","branches_url":"https://api.github.com/repos/csci-qa/calculator/branches{/branch}","tags_url":"https://api.github.com/repos/csci-qa/calculator/tags","blobs_url":"https://api.github.com/repos/csci-qa/calculator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/csci-qa/calculator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/csci-qa/calculator/git/refs{/sha}","trees_url":"https://api.github.com/repos/csci-qa/calculator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/csci-qa/calculator/statuses/{sha}","languages_url":"https://api.github.com/repos/csci-qa/calculator/languages","stargazers_url":"https://api.github.com/repos/csci-qa/calculator/stargazers","contributors_url":"https://api.github.com/repos/csci-qa/calculator/contributors","subscribers_url":"https://api.github.com/repos/csci-qa/calculator/subscribers","subscription_url":"https://api.github.com/repos/csci-qa/calculator/subscription","commits_url":"https://api.github.com/repos/csci-qa/calculator/commits{/sha}","git_commits_url":"https://api.github.com/repos/csci-qa/calculator/git/commits{/sha}","comments_url":"https://api.github.com/repos/csci-qa/calculator/comments{/number}","issue_comment_url":"https://api.github.com/repos/csci-qa/calculator/issues/comments{/number}","contents_url":"https://api.github.com/repos/csci-qa/calculator/contents/{+path}","compare_url":"https://api.github.com/repos/csci-qa/calculator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/csci-qa/calculator/merges","archive_url":"https://api.github.com/repos/csci-qa/calculator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/csci-qa/calculator/downloads","issues_url":"https://api.github.com/repos/csci-qa/calculator/issues{/number}","pulls_url":"https://api.github.com/repos/csci-qa/calculator/pulls{/number}","milestones_url":"https://api.github.com/repos/csci-qa/calculator/milestones{/number}","notifications_url":"https://api.github.com/repos/csci-qa/calculator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/csci-qa/calculator/labels{/name}","releases_url":"https://api.github.com/repos/csci-qa/calculator/releases{/id}","created_at":"2015-07-30T22:42:56Z","updated_at":"2015-08-02T01:54:12Z","pushed_at":"2015-09-18T02:49:11Z","git_url":"git://github.com/csci-qa/calculator.git","ssh_url":"git@github.com:csci-qa/calculator.git","clone_url":"https://github.com/csci-qa/calculator.git","svn_url":"https://github.com/csci-qa/calculator","homepage":null,"size":315,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":8,"forks":13,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/csci-qa/calculator/pulls/1"},"html":{"href":"https://github.com/csci-qa/calculator/pull/1"},"issue":{"href":"https://api.github.com/repos/csci-qa/calculator/issues/1"},"comments":{"href":"https://api.github.com/repos/csci-qa/calculator/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/csci-qa/calculator/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/csci-qa/calculator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/csci-qa/calculator/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/csci-qa/calculator/statuses/32b239e88f91f77f62b3af5f8656f40b3a8e0365"}}}}