diff options
| author | mo khan <mo@mokhan.ca> | 2009-05-27 07:33:57 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2009-05-27 07:33:57 -0600 |
| commit | 4fca0472d42f57ed7993ffab8c968178dc58f504 (patch) | |
| tree | c67a0441775520ac7e9e08c5b94e397b1b07b6ae | |
| parent | c5e95580396082f4038caac3837236895a16013d (diff) | |
got our second spec passing
| -rw-r--r-- | features/step_definitions/.mastermind.rb.swp | bin | 12288 -> 0 bytes | |||
| -rw-r--r-- | lib/mastermind/game.rb | 1 | ||||
| -rw-r--r-- | spec/mastermind/game_spec.rb | 8 |
3 files changed, 8 insertions, 1 deletions
diff --git a/features/step_definitions/.mastermind.rb.swp b/features/step_definitions/.mastermind.rb.swp Binary files differdeleted file mode 100644 index c466739..0000000 --- a/features/step_definitions/.mastermind.rb.swp +++ /dev/null diff --git a/lib/mastermind/game.rb b/lib/mastermind/game.rb index 86ed115..e4d3b17 100644 --- a/lib/mastermind/game.rb +++ b/lib/mastermind/game.rb @@ -6,6 +6,7 @@ module Mastermind end def start @messenger.puts "Welcome to Mastermind!" + @messenger.puts "Enter guess:" end end diff --git a/spec/mastermind/game_spec.rb b/spec/mastermind/game_spec.rb index e67cf85..45451b2 100644 --- a/spec/mastermind/game_spec.rb +++ b/spec/mastermind/game_spec.rb @@ -5,11 +5,17 @@ module Mastermind describe Game do context "starting up" do it "should send a welcome message" do - messenger = mock("messenger") + messenger = mock("messenger").as_null_object game = Game.new(messenger) messenger.should_receive(:puts).with("Welcome to Mastermind!") game.start end + it "should prompt for the first guess" do + messenger = mock("messenger").as_null_object + game = Game.new(messenger) + messenger.should_receive(:puts).with("Enter guess:") + game.start + end end end end |
