Commit fdc9a5a

mo k <mo@mokhan.ca>
2012-08-13 21:02:28
fix the cucumber typos.
1 parent 7509517
Changed files (2)
features/step_definitions/navigation_steps.rb
@@ -1,22 +1,23 @@
 $:.unshift(File.dirname(__FILE__) + '/../../spec')
 require 'spec_helper'
 
-Given /the plateau is (\d+) by (\d+)/ do |x,y|
+Given /^the plateau is (\d+) by (\d+)$/ do |x,y|
   @plateau = "#{x} #{y}"
 end
 
-Given "the starting position is '(.*)'" do |input|
+Given /^the starting position is '(.*)'$/ do |input|
   @rover = input
 end
 
-Given /I move '(.*)'/ do |instructions|
+Given /^I move "([^\"]*)"$/ do |instructions|
   @instructions = instructions
 end
 
-When /I tell the rover to travel/ do |op|
-  @command = NavigateRover.new(@plateau, @landing, @instructions)
+When /^I tell the rover to travel$/ do
+  @command = NavigateRover.new(@plateau, @rover, @instructions)
 end
 
-Then /the rovers final positions should be '(.*)' on the screen/ do |expected|
+Then /^the rovers final positions should be '(.*)' on the screen\.$/ do |expected|
   @command.run.should == expected
 end
+
features/navigation.feature
@@ -3,9 +3,9 @@ Feature: Navigation
   As a NASA employee
   I want to find out the final coordinates.
 
-  Scenario Outline: Navigate a rover
+  Scenario: Navigate a rover
     Given the plateau is 5 by 5
     And the starting position is '1 2 N'
-    And I move 'LMLMLMLMM'
+    And I move "LMLMLMLMM"
     When I tell the rover to travel
     Then the rovers final positions should be '1 3 N' on the screen.