Commit 47932cb

mo k <mo@mokhan.ca>
2012-11-04 21:16:46
rename forward to drive
1 parent 85e494c
Changed files (3)
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