@@ -1,7 +1,7 @@
require "navigate_rover"
describe NavigateRover do
- let(:sut) { NavigateRover.new }
+ let(:sut) { NavigateRover.new(plateau, starting_position, instructions ) }
describe "when navigating" do
context "plateau of 5 by 5" do
@@ -9,17 +9,18 @@ describe NavigateRover do
context "starting at 1 2 N" do
let(:starting_position) { '1 2 N' }
+ let(:instructions) {'LMLMLMLMM' }
it "should reply with the proper final coordinates" do
- sut.run(plateau, starting_position, 'LMLMLMLMM').should == '1 3 N'
+ sut.run.should == '1 3 N'
end
end
#context "starting at 3 3 E" do
- #let(:starting_position) { '3 3 E' }
+ #let(:starting_position) { '3 3 E' }
- #it "should reply with the proper final coordinates" do
- #sut.run(plateau, starting_position, 'MMRMMRMRRM').should == '5 1 E'
- #end
+ #it "should reply with the proper final coordinates" do
+ #sut.run(plateau, starting_position, 'MMRMMRMRRM').should == '5 1 E'
+ #end
#end
end
end