Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/emilyjspencer/oystercard-june


https://github.com/emilyjspencer/oystercard-june

oop oop-principles rspec ruby tdd

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

### Oystercard

An OOP application simulating the London Oyster Card System.

## User Stories:

```
In order to use public transport
As a customer
I want money on my card

In order to keep using public transport
As a customer
I want to add money to my card

In order to protect my money from theft or loss
As a customer
I want a maximum limit (of £90) on my card

In order to pay for my journey
As a customer
I need my fare deducted from my card

In order to get through the barriers.
As a customer
I need to touch in and out.

In order to pay for my journey
As a customer
I need to have the minimum amount (£1) for a single journey.

In order to pay for my journey
As a customer
When my journey is complete, I need the correct amount deducted from my card

In order to pay for my journey
As a customer
I need to know where I've travelled from

In order to know where I have been
As a customer
I want to see all my previous trips

In order to know how far I have travelled
As a customer
I want to know what zone a station is in

In order to be charged correctly
As a customer
I need a penalty charge deducted if I fail to touch in or out

```

## How to run:

* Clone this repo: git clone https://github.com/emilyjspencer/oystercard-june.git
* Cd into the repo
* Run **bundle install** to install the dependencies
* Open the built-in repl - irb
* Require in the relevant files
* Instantiate the objects
* Call the appropriate methods on the objects

## How to run the tests:

In the command line type:
```html
rspec
```

## Built with: Ruby, RSpec

## Tested with: RSpec