Requirements:
- Ruby v3.1.1 or higher (documentation)
- Bundler gem (documentation)
Clone this repo, and run:
bundle install
To start the app with the sample instructions (located in ./lib/input.txt
) run:
ruby lib/main.rb
The testing library used is RSpec. To run the tests:
rspec
In the terminal run rspec
to generate the report, then run open coverage/index.html
to open the report in the browser.
The linter used is Rubocop. Run:
rubocop
- Checking the coordinate values are 50 or less
- Checking the instruction strings are less than 100 characters in length
- Checking the orientation valid (N, S, E or W)
- Checking each direction is valid (L, R or F)
- Consider the possibility of whitespace on each input line