Skip to content

Commit

Permalink
clean up comments and names for first code review
Browse files Browse the repository at this point in the history
  • Loading branch information
indisaurusrex committed Aug 11, 2020
1 parent e437b12 commit 3d23108
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ def initialize
end

def deposit(amount, date)
# updates the current balance of the account
@balance += amount
# adds the transaction to the front of the transactions array
@transactions.unshift({ date: date, credit: amount, balance: @balance })
end

def withdraw(amount, date)
# updates current balance of account
@balance -= amount
# adds the transaction to the front of the transactions array
@transactions.unshift({ date: date, debit: amount, balance: @balance })
end

Expand Down
2 changes: 1 addition & 1 deletion spec/account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe BankAccount do
describe '#print_statement' do
it 'prints a blank statement for a new account' do
it 'can print a blank statement for a new account' do
expect do
BankAccount.new.print_statement
end.to output("date || credit || debit || balance\n").to_stdout
Expand Down

0 comments on commit 3d23108

Please sign in to comment.