For this issue, I've used MiniTests to avoid any dependency and to rely on the Ruby Standard Library only.
I kept the implementation simple as possible if you have any remarks about the code or its structure I would love to hear the feedback.
In order to execute tests run the following command:
ruby test/test_rover_problem.rb