What is greener - grass or #Result
rspec spec/atm_spec.rb
Atm is expected to hold $1000 when instantiated is expected to reduce funds on withdraw is expected to reduce funds on withdraw is expected to allow withdraw if account has enough balance is expected to reject an withdrawal if account has insufficient funds reject withdraw if ATM has insufficient funds reject withdraw if the pin is wrong reject withdraw if the card is expired rejects withdraw if account status is not active
Finished in 0.01397 seconds (files took 0.11136 seconds to load) 9 examples, 0 failures
As a programmer
In order to produce good quality code
I want to work in a test driven way and unit test my code
As a User
In order to make a withdrawal
The ATM needs to have funds
As a User
In order to know if my withdrawal was successful or unsuccessful
I want to receive a message with my withdrawal details
As an ATM operator
In order for the right person to make a withdrawal
I want each person to have a separate account
As an ATM operator
In order to ensure that an Account holder can only withdraw funds that he has balance for
I want to allow a withdrawal only if there are sufficient funds in the account
As an ATM operator
In order for our costumers to withdraw funds
I need to make sure that we only allow withdrawals if there are funds available
As a Customer
To keep my funds secure
I want a secure Pin code & an expiry date on my card that allows only me access to my funds
As an ATM operator
In order to allow access to active customers
I want to allow withdrawals from only active accounts
As a Bank Customer
In order to withdraw funds in even amounts
I want to receive funds in 5, 10 & 20$ bills
As a Customer
In order to manage my funds
I need to have a personal account
As an ATM operator
In order to keep track of our costumers
We want to assign each account to a separate person