From d21d6b13d211e57db037acdd09dbd82b371af9ab Mon Sep 17 00:00:00 2001 From: mo k Date: Sat, 11 Feb 2012 15:08:41 -0700 Subject: when facing west and turning left and right. --- spec/rover_specs.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'spec') diff --git a/spec/rover_specs.rb b/spec/rover_specs.rb index 7bef598..318590f 100644 --- a/spec/rover_specs.rb +++ b/spec/rover_specs.rb @@ -59,4 +59,22 @@ describe Rover do end end + describe "when facing west" do + before do + @sut.heading= :west + end + describe "when turning right" do + it "should face north" do + @sut.turn_right + @sut.heading.must_equal :north + end + end + describe "when turning left" do + it "should face south" do + @sut.turn_left + @sut.heading.must_equal :south + end + end + end + end -- cgit v1.2.3