@@ -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