Collaborating with Sanda, this is one of our first attempt to use OOD, and TDD. We have used CRC to aid our process of OOD.
Responsibility |
Collaborators |
Break |
User |
Be Fixed |
Garage |
Responsibility |
Collaborators |
Transfer |
Bike, Station, Garage |
(Eject) |
Bike, Station, Garage |
(Receive) |
Bike, Station, Garage |
Responsibility |
Collaborators |
Transfer |
Bike, Station, Garage |
Fix |
Bike |
(Eject) |
Bike, Station, Garage |
(Receive) |
Bike, Station, Garage |
Responsibility |
Collaborators |
Rent |
User |
Dock |
User |
Release |
Bike |
Transfer |
Bike, Station, Garage |
(Eject) |
Bike, Station, Garage |
(Receive) |
Bike, Station, Garage |
// Creating a double with preset property
let(:bike) {double: working_bike, broken?: false}
// Allowing the double to receive certain methods
allow(bike).to receive(:break!)