summaryrefslogtreecommitdiff
path: root/spec/console_specs.rb
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-02-16 23:01:49 -0700
committermo k <mo@mokhan.ca>2012-02-16 23:01:49 -0700
commit23c3c07dcf93c07cfc536cfd5d26933ae2d4b7a8 (patch)
tree45ac5fb894f9023e785a92848cd39299d5f9cb11 /spec/console_specs.rb
parentfda7402b36f86310afe52e9f30eb87fb73829a26 (diff)
figure out how to interact with the console.
Diffstat (limited to 'spec/console_specs.rb')
-rw-r--r--spec/console_specs.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/console_specs.rb b/spec/console_specs.rb
new file mode 100644
index 0000000..a61855d
--- /dev/null
+++ b/spec/console_specs.rb
@@ -0,0 +1,22 @@
+require "console"
+
+describe Console do
+ before do
+ @input = fake
+ @output = fake
+ @presenter = fake
+ @sut = Console.new(@input, @output)
+ end
+ describe "when run" do
+ it "should ask for the size of the terrain" do
+ @output.received(:puts).called_with("Please enter the size of the terrain:").wont_be_nil
+ end
+ it "should create the terrain" do
+ @presenter.received(:provide_upper_right_coordinates).called_with("5 5").wont_be_nil
+ end
+ before do
+ @input.stub(:gets).and_return("5 5")
+ #@sut.run(@presenter)
+ end
+ end
+end