summaryrefslogtreecommitdiff
path: root/features/step_definitions/mastermind.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2009-05-26 14:29:57 -0600
committermo khan <mo@mokhan.ca>2009-05-26 14:29:57 -0600
commitc47b71e4c3a0fe18d2eb705bd0e9b7c33e6b2e92 (patch)
tree28ceac4d0d9104c42cbbba157fbf1540eaf1594c /features/step_definitions/mastermind.rb
parent315afa528731bb30d2dbfe2cb1aac29b852bcf4b (diff)
started working on initial design
Diffstat (limited to 'features/step_definitions/mastermind.rb')
-rw-r--r--features/step_definitions/mastermind.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/features/step_definitions/mastermind.rb b/features/step_definitions/mastermind.rb
index c6b7c3b..6427dcc 100644
--- a/features/step_definitions/mastermind.rb
+++ b/features/step_definitions/mastermind.rb
@@ -2,3 +2,13 @@
Given /^I am not yet playing$/ do
end
+
+When /^I start a new game$/ do
+ @messenger = StringIO.new
+ Mastermind::Game.new(@messenger)
+ game.start
+end
+
+Then /^the game should say "(.$)"$/ do |message|
+ @messenger.string.split("\n").should include(message)
+end