summaryrefslogtreecommitdiff
path: root/features/step_definitions/mastermind.rb
diff options
context:
space:
mode:
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