{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/comments/34862224","id":34862224,"diff_hunk":"@@ -0,0 +1,65 @@\n+require \"spec_helper\"\n+require \"./lib/bank_account/checking_account\"\n+\n+describe BankAccount::CheckingAccount do\n+\n+    it \"Account class is the parent of CheckingAccount\" do\n+      expect(BankAccount::CheckingAccount.superclass).to eq(BankAccount::Account)\n+    end\n+\n+  context \"#self.new\" do\n+    it \"responds to class method called new\" do\n+      expect(BankAccount::CheckingAccount).to respond_to :new\n+    end\n+  end # .new\n+\n+  context \"#withdraw\" do\n+  let (:check_account) {BankAccount::CheckingAccount.new(123, 100_000)}\n+    it \"returns the withdrawal amount 100 + $1 transaction fee\" do\n+      expect(check_account.withdraw(100)).to eq(99_899)\n+    end\n+  end # withdraw\n+\n+  context \"#withdraw_using_check\" do\n+    let (:check_account2) {BankAccount::CheckingAccount.new(123, 100)}\n+    it \"returns the updated account balance of 90 when withdrawn 10\" do\n+      expect(check_account2.withdraw_using_check(10)).to eq(90)\n+    end\n+\n+    it \"allows $-10 of overdraft protection, returns -10 balance\" do\n+      expect(check_account2.withdraw_using_check(110)).to eq(-10)\n+    end\n+\n+    let (:big_spender) {BankAccount::CheckingAccount.new(123, 1_000)}\n+    it \"returns the original balance if attempt to withdraw beyond $-10\" do\n+      expect(big_spender.withdraw_using_check(2_000)).to eq(1_000)\n+    end\n+\n+    it \"Balance after 3 $200 checks is $400\" do\n+      3.times do\n+        big_spender.withdraw_using_check(200)\n+      end\n+      expect(big_spender.balance).to eq(400)\n+    end\n+\n+    it \"After 4th check of $200 ( + $2 transaction fee) balance is 198\" do\n+      4.times do\n+        big_spender.withdraw_using_check(200)\n+      end\n+        expect(big_spender.balance).to eq(198)\n+    end\n+\n+  end # withdraw_using_check\n+\n+  context \"#reset_checks\" do\n+      let(:checker) {BankAccount::CheckingAccount.new(123, 5_000)}\n+\n+    it \"resets the check counter back to zero\" do\n+      5.times do\n+        checker.withdraw_using_check(200)\n+      end\n+      expect(checker.reset_checks).to eq(0)","path":"spec/lib/bank_account/checking_account_spec.rb","position":61,"original_position":61,"commit_id":"82aa1a9b2072da6c5429c70ffe5d372599ef3e03","original_commit_id":"82aa1a9b2072da6c5429c70ffe5d372599ef3e03","user":{"login":"brittinator","id":11141513,"avatar_url":"https://avatars.githubusercontent.com/u/11141513?v=3","gravatar_id":"","url":"https://api.github.com/users/brittinator","html_url":"https://github.com/brittinator","followers_url":"https://api.github.com/users/brittinator/followers","following_url":"https://api.github.com/users/brittinator/following{/other_user}","gists_url":"https://api.github.com/users/brittinator/gists{/gist_id}","starred_url":"https://api.github.com/users/brittinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brittinator/subscriptions","organizations_url":"https://api.github.com/users/brittinator/orgs","repos_url":"https://api.github.com/users/brittinator/repos","events_url":"https://api.github.com/users/brittinator/events{/privacy}","received_events_url":"https://api.github.com/users/brittinator/received_events","type":"User","site_admin":false},"body":"Oh yeah, I didn't even think about how this makes no sense by just looking at contexts and it blocks","created_at":"2015-07-17T04:55:18Z","updated_at":"2015-07-17T04:55:18Z","html_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/12#discussion_r34862224","pull_request_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/comments/34862224"},"html":{"href":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/12#discussion_r34862224"},"pull_request":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/12","id":36591379,"html_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/12","diff_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/12.diff","patch_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/12.patch","issue_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/12","number":12,"state":"open","locked":false,"title":"Bank Account - Lunch Version","user":{"login":"brittinator","id":11141513,"avatar_url":"https://avatars.githubusercontent.com/u/11141513?v=3","gravatar_id":"","url":"https://api.github.com/users/brittinator","html_url":"https://github.com/brittinator","followers_url":"https://api.github.com/users/brittinator/followers","following_url":"https://api.github.com/users/brittinator/following{/other_user}","gists_url":"https://api.github.com/users/brittinator/gists{/gist_id}","starred_url":"https://api.github.com/users/brittinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brittinator/subscriptions","organizations_url":"https://api.github.com/users/brittinator/orgs","repos_url":"https://api.github.com/users/brittinator/repos","events_url":"https://api.github.com/users/brittinator/events{/privacy}","received_events_url":"https://api.github.com/users/brittinator/received_events","type":"User","site_admin":false},"body":"Bank Account - Lunch, Please run bank_account.rb from the root folder.  No gems required.\r\n\r\nIn the specs, I tried not to repeat myself, but I still made a number of bank account instances.  Writing the first few specs are hard because there's not code to talk about, but I tried to start simple and work up to more complex tests.  I used inheritance for similar attributes/methods as much as I could, but if there's some that I missed please let me know.","created_at":"2015-05-31T23:10:26Z","updated_at":"2015-07-17T04:55:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32501cb4828b314586470b9a59b71d307639c44b","assignee":{"login":"jnf","id":27784,"avatar_url":"https://avatars.githubusercontent.com/u/27784?v=3","gravatar_id":"","url":"https://api.github.com/users/jnf","html_url":"https://github.com/jnf","followers_url":"https://api.github.com/users/jnf/followers","following_url":"https://api.github.com/users/jnf/following{/other_user}","gists_url":"https://api.github.com/users/jnf/gists{/gist_id}","starred_url":"https://api.github.com/users/jnf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnf/subscriptions","organizations_url":"https://api.github.com/users/jnf/orgs","repos_url":"https://api.github.com/users/jnf/repos","events_url":"https://api.github.com/users/jnf/events{/privacy}","received_events_url":"https://api.github.com/users/jnf/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/12/commits","review_comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/12/comments","review_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/12/comments","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/statuses/82aa1a9b2072da6c5429c70ffe5d372599ef3e03","head":{"label":"brittinator:blw/master","ref":"blw/master","sha":"82aa1a9b2072da6c5429c70ffe5d372599ef3e03","user":{"login":"brittinator","id":11141513,"avatar_url":"https://avatars.githubusercontent.com/u/11141513?v=3","gravatar_id":"","url":"https://api.github.com/users/brittinator","html_url":"https://github.com/brittinator","followers_url":"https://api.github.com/users/brittinator/followers","following_url":"https://api.github.com/users/brittinator/following{/other_user}","gists_url":"https://api.github.com/users/brittinator/gists{/gist_id}","starred_url":"https://api.github.com/users/brittinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brittinator/subscriptions","organizations_url":"https://api.github.com/users/brittinator/orgs","repos_url":"https://api.github.com/users/brittinator/repos","events_url":"https://api.github.com/users/brittinator/events{/privacy}","received_events_url":"https://api.github.com/users/brittinator/received_events","type":"User","site_admin":false},"repo":{"id":36468983,"name":"C3Projects--BankAccounts","full_name":"brittinator/C3Projects--BankAccounts","owner":{"login":"brittinator","id":11141513,"avatar_url":"https://avatars.githubusercontent.com/u/11141513?v=3","gravatar_id":"","url":"https://api.github.com/users/brittinator","html_url":"https://github.com/brittinator","followers_url":"https://api.github.com/users/brittinator/followers","following_url":"https://api.github.com/users/brittinator/following{/other_user}","gists_url":"https://api.github.com/users/brittinator/gists{/gist_id}","starred_url":"https://api.github.com/users/brittinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brittinator/subscriptions","organizations_url":"https://api.github.com/users/brittinator/orgs","repos_url":"https://api.github.com/users/brittinator/repos","events_url":"https://api.github.com/users/brittinator/events{/privacy}","received_events_url":"https://api.github.com/users/brittinator/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brittinator/C3Projects--BankAccounts","description":"","fork":true,"url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts","forks_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/forks","keys_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/teams","hooks_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/hooks","issue_events_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/issues/events{/number}","events_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/events","assignees_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/assignees{/user}","branches_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/branches{/branch}","tags_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/tags","blobs_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/git/refs{/sha}","trees_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/statuses/{sha}","languages_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/languages","stargazers_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/stargazers","contributors_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/contributors","subscribers_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/subscribers","subscription_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/subscription","commits_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/commits{/sha}","git_commits_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/git/commits{/sha}","comments_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/comments{/number}","issue_comment_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/issues/comments{/number}","contents_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/contents/{+path}","compare_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/merges","archive_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/downloads","issues_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/issues{/number}","pulls_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/pulls{/number}","milestones_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/milestones{/number}","notifications_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/labels{/name}","releases_url":"https://api.github.com/repos/brittinator/C3Projects--BankAccounts/releases{/id}","created_at":"2015-05-28T22:11:54Z","updated_at":"2015-05-28T21:16:52Z","pushed_at":"2015-05-31T23:03:46Z","git_url":"git://github.com/brittinator/C3Projects--BankAccounts.git","ssh_url":"git@github.com:brittinator/C3Projects--BankAccounts.git","clone_url":"https://github.com/brittinator/C3Projects--BankAccounts.git","svn_url":"https://github.com/brittinator/C3Projects--BankAccounts","homepage":null,"size":104,"stargazers_count":0,"watchers_count":0,"language":null,"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":"Ada-Developers-Academy:blw/master","ref":"blw/master","sha":"5c6038b640c9deb5600dadac97e6611db6804670","user":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"repo":{"id":36466643,"name":"C3Projects--BankAccounts","full_name":"Ada-Developers-Academy/C3Projects--BankAccounts","owner":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts","description":"","fork":false,"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts","forks_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/forks","keys_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/teams","hooks_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/hooks","issue_events_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/events","assignees_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/tags","blobs_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/languages","stargazers_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/stargazers","contributors_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/contributors","subscribers_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/subscribers","subscription_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/subscription","commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/merges","archive_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/downloads","issues_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/labels{/name}","releases_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/releases{/id}","created_at":"2015-05-28T21:16:52Z","updated_at":"2015-05-28T21:16:52Z","pushed_at":"2015-07-13T15:04:56Z","git_url":"git://github.com/Ada-Developers-Academy/C3Projects--BankAccounts.git","ssh_url":"git@github.com:Ada-Developers-Academy/C3Projects--BankAccounts.git","clone_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts.git","svn_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts","homepage":null,"size":968,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":2,"forks":26,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/12"},"html":{"href":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/12"},"issue":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/12"},"comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/statuses/82aa1a9b2072da6c5429c70ffe5d372599ef3e03"}}}}