Commit 47932cb
Changed files (3)
spec
unit
lib/move_forward.rb
@@ -4,7 +4,7 @@ class MoveForward
end
def run(instruction)
if matches(instruction)
- @rover.forward
+ @rover.drive
end
end
def matches(item)
lib/rover.rb
@@ -9,7 +9,7 @@ class Rover
@location.rotate(degrees)
end
- def forward
+ def drive
@plateau.move_forward(@location.heading, @location.location)
end
@@ -17,10 +17,6 @@ class Rover
@location.is_facing(direction)
end
- def location
- @location.location
- end
-
def to_s
@location.to_s
end
spec/unit/rover_spec.rb
@@ -79,7 +79,7 @@ describe Rover do
end
before do
@sut = create_sut(:north)
- @sut.forward
+ @sut.drive
end
end