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
Fu=irst test case and 3 assertions passed
ashtn committed Feb 22, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 858f1115f3b0b8f7e60d39914f00cb7da532e17f
8 changes: 4 additions & 4 deletions specs/account_spec.rb
Original file line number Diff line number Diff line change
@@ -3,9 +3,11 @@
require 'minitest/skip_dsl'
require_relative '../lib/account'



describe "Wave 1" do
describe "Account#initialize" do
it "Takes an ID and an initial balance" do
it "Takes an ID and an initial balance" do #this is one test case with 4 assertions
id = 1337
balance = 100.0
account = Bank::Account.new(id, balance)
@@ -18,7 +20,7 @@
end

it "Raises an ArgumentError when created with a negative balance" do
skip

# Note: we haven't talked about procs yet. You can think
# of them like blocks that sit by themselves.
# This code checks that, when the proc is executed, it
@@ -29,15 +31,13 @@
end

it "Can be created with a balance of 0" do
skip
# If this raises, the test will fail. No 'must's needed!
Bank::Account.new(1337, 0)
end
end

describe "Account#withdraw" do
it "Reduces the balance" do
skip
start_balance = 100.0
withdrawal_amount = 25.0
account = Bank::Account.new(1337, start_balance)