summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-02-11 14:26:37 -0700
committermo k <mo@mokhan.ca>2012-02-11 14:26:37 -0700
commit81e20a213cb21e66e71843d05bbcb3ad42fcb089 (patch)
treed8da56d8a59cb6460df6f42a256ceea8bb899b30
parent38f4486ecf5fbb28af7a2e269a514ff08b507fae (diff)
building a rover.
-rw-r--r--Gemfile.lock8
-rw-r--r--gemfile1
-rw-r--r--lib/rover.rb11
-rw-r--r--test/rover_specs.rb18
-rw-r--r--test/ts_all.rb1
5 files changed, 39 insertions, 0 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index f53a82a..888ef1f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -2,9 +2,17 @@ GEM
remote: https://rubygems.org/
specs:
developwithpassion_fakes (0.0.1)
+ ffi (1.0.11)
+ guard (0.10.0)
+ ffi (>= 0.5.0)
+ thor (~> 0.14.6)
+ guard-minitest (0.4.0)
+ guard (~> 0.4)
+ thor (0.14.6)
PLATFORMS
ruby
DEPENDENCIES
developwithpassion_fakes
+ guard-minitest
diff --git a/gemfile b/gemfile
index b39935c..88ed022 100644
--- a/gemfile
+++ b/gemfile
@@ -1,3 +1,4 @@
source 'https://rubygems.org'
+gem 'guard-minitest'
gem 'developwithpassion_fakes'
diff --git a/lib/rover.rb b/lib/rover.rb
new file mode 100644
index 0000000..ba14c0a
--- /dev/null
+++ b/lib/rover.rb
@@ -0,0 +1,11 @@
+class Rover
+ def initialize
+
+ end
+ def heading
+
+ end
+ def turn_right
+
+ end
+end
diff --git a/test/rover_specs.rb b/test/rover_specs.rb
new file mode 100644
index 0000000..0d25d6e
--- /dev/null
+++ b/test/rover_specs.rb
@@ -0,0 +1,18 @@
+require 'rover'
+
+describe Rover do
+ before do
+ sut = Rover.new
+ end
+ describe "when facing north" do
+ describe "when turning right" do
+ it "should face east" do
+ sut.heading.must_equal :east
+ end
+ before do
+ sut.heading :north
+ sut.turn_right
+ end
+ end
+ end
+end
diff --git a/test/ts_all.rb b/test/ts_all.rb
index 3fbf7ad..9bf43ab 100644
--- a/test/ts_all.rb
+++ b/test/ts_all.rb
@@ -6,4 +6,5 @@ require 'spec_helper'
require "book_specs"
require "library_specs"
require "stack_specs"
+require "rover_specs"
require "specifications/find_all_books_by_author_specs"