diff --git a/app.rb b/app.rb index 8619d32..f1d98d0 100644 --- a/app.rb +++ b/app.rb @@ -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 diff --git a/spec/account_spec.rb b/spec/account_spec.rb index f167d57..21ad686 100644 --- a/spec/account_spec.rb +++ b/spec/account_spec.rb @@ -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