Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ashton's Bank Account #31

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
f7f6582
Added skip to specs document to create space on terminal& 1st test ca…
Feb 21, 2017
0840db6
2nd test case passed
Feb 22, 2017
858f111
Fu=irst test case and 3 assertions passed
Feb 22, 2017
06dd983
first test case and 3 asserstions passed
Feb 22, 2017
72f2817
Withdraw test case passed
Feb 22, 2017
241938e
giving up for now
Feb 22, 2017
0e4b4d9
Yay, they passed, that pesky put slash print
Feb 22, 2017
4e5531d
Account.all returns an array, so exciteing, but my code is a hot mess
Feb 23, 2017
e097a96
refactoring spec code, to account for account hash
Feb 23, 2017
3c8be93
All of wave 1 is refactored for account hash
Feb 23, 2017
711fc66
5 of 6 .all assertions passed
Feb 23, 2017
60e0560
Started Account.find - code and test are broken though
Feb 23, 2017
fff6b59
Added before and @accounts to specs, 2 assertions in wave 2 pass
Feb 23, 2017
3198a9d
.find works in .rb file yayyyy
Feb 24, 2017
d8a3da0
Whooo return an account that exits, thanks chris
Feb 24, 2017
02c15ad
Wave 2 complete
Feb 24, 2017
feecde5
specs uncommented out
Feb 24, 2017
732ff2d
Created Savings and Checking class stubs
Feb 24, 2017
c40b4d5
refactored spec to account for hash, first test passed
Feb 24, 2017
d4af7a6
passed first savings account test
Feb 24, 2017
e63333c
Withdraw test writted for checking account
Feb 24, 2017
b34ced5
Withdraw applies 1 dollar fee in checking
Feb 24, 2017
7eec7ed
Balance is not modified on attempted overdraft in checking
Feb 24, 2017
654a604
Savings account starting balance less than 10 raises error
Feb 24, 2017
8920e59
Savings Withdaw applies 2 dollar fee
Feb 24, 2017
79d1cad
Outputs warning at attempted overdraft
Feb 24, 2017
bc499cd
Savings withdraw applies 2 dollar fee
Feb 24, 2017
3f36b43
savings outputs warning message on attempted overdraft
Feb 24, 2017
553a1bc
savings doesnt modify balance at attempted over draft
Feb 24, 2017
a50dacb
savings fee, will no modify or overdraft account
Feb 24, 2017
c354aba
check_withdraw reduces balance
Feb 24, 2017
a8ed7eb
check_withdraw returns modified balance
Feb 24, 2017
fc915f2
check_withdraw allows balance to reach -10
Feb 24, 2017
5f754b4
edit to check_withdraw method to allow balance to reach -10
Feb 24, 2017
9229fee
test commit with git add .
Feb 24, 2017
446e26c
checking account doesnt modify account in attempted overdraft
Feb 24, 2017
6497ef8
check_withdraw requires postive number
Feb 24, 2017
42093a0
check_withdraw allow 3 free uses
Feb 24, 2017
0e81240
check_withdraw method passed all tests
Feb 24, 2017
fa9c1b4
forgot to add checking.rb
Feb 24, 2017
86050bd
Specs for Checking_account subclass have all passed
Feb 24, 2017
b09c465
add_interest returns calculated interst
Feb 24, 2017
2170655
add_interest updates balance with interest
Feb 24, 2017
84b3933
all tests are complete for savings sub class
Feb 24, 2017
71347e6
Fixed savings withdraw false pass
Feb 24, 2017
45590b3
refactored account initialize
Feb 24, 2017
6309173
refactored savings.rb
Feb 24, 2017
5d1990b
checking if github is linked
ashtn Mar 6, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
savings outputs warning message on attempted overdraft
ashtn committed Feb 24, 2017
commit 3f36b436964f9ec75d88e8fc53173592932ce7cd
7 changes: 4 additions & 3 deletions specs/savings_account_spec.rb
Original file line number Diff line number Diff line change
@@ -31,13 +31,14 @@
end

it "Applies a $2 fee each time" do

@account.withdraw(20).must_equal 88
end

it "Outputs a warning if the balance would go below $10" do
skip
proc {@account.withdraw(110)}.must_raise ArgumentError

proc { @account.withdraw(110) }.must_output(/.+/)

end

it "Doesn't modify the balance if it would go below $10" do