Commit d92139e

mo k <mo@mokhan.ca>
2012-08-13 02:55:29
try to connect the cucumber steps.
1 parent 5a4baec
Changed files (2)
features
step_definitions
support
features/step_definitions/navigation_steps.rb
@@ -5,8 +5,8 @@ Given /the plateau is (\d+) by (\d+)/ do |x,y|
   @plateau = "#{x} #{y}"
 end
 
-Given "the starting position is '(\d+) (\d+) (.*)'" do |x,y, heading|
-  @rover = "#{x} #{y} #{heading}"
+Given "the starting position is '(.*)'" do |input|
+  @rover = input
 end
 
 Given /I move '(.*)'/ do |instructions|
@@ -17,6 +17,6 @@ When /I tell the rover to travel/ do |op|
   @command = NavigateRover.new(@plateau, @landing, @instructions)
 end
 
-Then /the result should be '1 3 N' on the screen/ do
-  @command.run.should == '1 3 N'
+Then /the rovers final positions should be '(.*)' on the screen/ do |expected|
+  @command.run.should == expected
 end
features/support/env.rb
@@ -0,0 +1,1 @@
+require 'simplecov'