Week 2 Challenge at Makers Academy
1. In order to use public transport,
As a customer,
I want money on my card.
2. In order to keep using public transport,
As a customer,
I want to add money to my card.
3. In order to protect my money,
As a customer,
I don't want to put too much money on my card
4. In order to pay for my journey,
As a customer,
I need my fare deducted from my card.
5. In order to get through the barriers,
As a customer,
I need to touch in and out.
6. In order to pay for my journey,
As a customer,
I need to have the minimum amount for a single journey.
7. In order to pay for my journey,
As a customer,
I need to pay for my journey when it's complete.
8. In order to pay for my journey,
As a customer,
I need to know where I've travelled from.
9. In order to know where I have been,
As a customer,
I need to see all my previous trips.
10. In order to know how far I have travelled,
As a customer,
I want to know what zone a station is in.
10. In order to be charged correctly,
As a customer,
I need a penalty charge deducted if I fail to touch in or out
11. In order to be charged the correct amount,
As a customer,
I need to have the correct fare calculated.
- Clone the repository and change directory inside of it by using the following command lines:
git clone [email protected]:georn/oystercard.git
cd oystercard
Then you can run the test suite using:
# Install dependencies
bundle Install
# Run the test suite (rspec)
rspec
- Oystercard has a balance.
- Oystercard can be top up.
- Oystercard have a top limit.
- Oystercard balance gets can be deducted.
- Oystercard can touch in Station(s).
- Oystercard can touch out Station(s).
- Oystercard does have a minimum fare.
- Oystercard can't touch in without minimum fare on balance.
- Oystercard deducts fare from balance when touch out from a station.
- Oystercard tracks the current and previous journeys.
- Station has a zone and it can be read.
- Penalty fare is charged if card is not touch in or out.
- Correct fare is calculated when completing a journey.
This amazing people collaborated to the code, but by that time I wasn't a good git collaborator. Thus, it is now when they have their credits.