From b1c2f983456637975dc41dee6f5bab65d2afaa66 Mon Sep 17 00:00:00 2001 From: mo k Date: Sat, 11 Feb 2012 15:06:59 -0700 Subject: when facing east and turning left or 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 ccf3f02..7bef598 100644 --- a/spec/rover_specs.rb +++ b/spec/rover_specs.rb @@ -41,4 +41,22 @@ describe Rover do end end + describe "when facing east" do + before do + @sut.heading= :east + end + describe "when turning right" do + it "should face south" do + @sut.turn_right + @sut.heading.must_equal :south + end + end + describe "when turning left" do + it "should face north" do + @sut.turn_left + @sut.heading.must_equal :north + end + end + end + end -- cgit v1.2.3