clojure
clojure copied to clipboard
Tests in Robot Simulator are overly prescriptive
The robot simulator exercise contains two tests that cause problems for students.
(deftest can-turn-right
(is (= :north (robot-simulator/turn-right :west))))
(deftest can-turn-left
(is (= :west (robot-simulator/turn-left :north))))
A completely valid approach would be for turn-left and turn-right to accept a robot as input and produce a robot as output. However, the tests preclude this approach to solving the exercise. I would advocate for removing these tests.
@cstby I like the way you're thinking. Would removing just those 2 deftests do the trick?
I agree, these two tests don't really serve any purpose. I can sync with the current specs and use the correct way to test if the robot turns correctly.
@bobbicodes I'll PR this.