Skip to content

Latest commit

 

History

History
67 lines (41 loc) · 2.29 KB

README.md

File metadata and controls

67 lines (41 loc) · 2.29 KB

ToyRobot - Drew Noll (@oheydrew)

Documentation

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.

Pre-Requisites

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

Installation

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.

Running Tests

Standard RSpec tests

To run the full test suite navigate to the project root (eg: ~/toy_robot/) and run:

~/toy_robot/ $ rspec

Guard-RSpec for auto-running tests

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.

Author

Drew Noll - [email protected] | www.oheydrew.me