/clock

Primary LanguageRuby

Clock

Implement a clock that handles times without dates.

You should be able to add to, and subtract hours and minutes from it.

Two clocks that represent the same time should be equal to each other.

Rules of engagement

  1. Do not spend more than 2 hours on it
  2. We care about features that the tests require (see tests as the spec)
  3. We care about tidiness, readability, brevity (in that order)
  4. We care about talking points
  5. We value quality over quantity
  6. If you find that tests can be expanded - feel free to do so.
  7. Reach out if you have any questions
  8. Git commit history (atomic commits, what the commit messages look like) is not going to be evaluated

For running the tests provided, you will need the Minitest gem. Open a terminal window and run the following command to install minitest:

gem install minitest

Run the tests from the exercise directory using the following command:

ruby clock_test.rb

Red, green, refactor. On passing a test, see if you can refactor your solution, or whether you want to proceed to the next test.

When you're done, please share your submission using our uploader at https://recruitment.wetransfer.com/