ToyRobot - Drew Noll (@oheydrew)
- PROBLEM.md : The supplied problem outline in full
- SOLUTION_NOTES.md : Outline of my solution, class breakdown & general mechanics
This is my solution to the "Toy Robot" problem, written in Ruby. I had a great time stepping through this problem, from initial concept stages right through to the challenges I found.
I decided to write this with Test Driven Development, writing Tests first for each desired class, and move into implementation from there. This was useful in many ways, albeit a little slower overall, but that's not such a bad thing, when you're looking for something robust.
Please take a look at my SOLUTION_NOTES.md for more information about the implementation, as well as my successes and challenges.
Unix-Based OS: MacOS or Linux preferred, or Linux Subsystem for Windows
Ruby Version: >2.4.1: can be found here
Bundler (Ruby Gem): can be found here
To install, simply unzip/clone the contents of this repo to the desired directory and run bundle install
to install dependencies:
~/toy_robot/ $ bundle install
Then, to run the program, run run_toy_robot.rb
from the unix command line.
~/toy_robot/ $ run_toy_robot.rb
I used bundler's Gemspec
configuration for quick folder / rspec setup, but this gem is not pushed to rubygems.org.
To run the full test suite navigate to the project root (eg: ~/toy_robot/
) and run:
~/toy_robot/ $ rspec
This project has guard insatalled with the guard-rails
plugin. This can automate your tests, watching in the background for any changes. To run tests in this way, run:
~/toy_robot/ $ bundle exec guard
This will run guard
, and watch for changes.
Drew Noll - drew@oheydrew.me | www.oheydrew.me