diff options
| author | mo k <mo@mokhan.ca> | 2012-02-16 23:01:49 -0700 |
|---|---|---|
| committer | mo k <mo@mokhan.ca> | 2012-02-16 23:01:49 -0700 |
| commit | 23c3c07dcf93c07cfc536cfd5d26933ae2d4b7a8 (patch) | |
| tree | 45ac5fb894f9023e785a92848cd39299d5f9cb11 /spec/console_specs.rb | |
| parent | fda7402b36f86310afe52e9f30eb87fb73829a26 (diff) | |
figure out how to interact with the console.
Diffstat (limited to 'spec/console_specs.rb')
| -rw-r--r-- | spec/console_specs.rb | 22 |
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 |
