Commit c47b71e
Changed files (4)
bin/env.rb
@@ -0,0 +1,5 @@
+$LOAD_PATH.push File.join(File.dirname(__FILE__), "/../lib")
+require 'mastermind'
+
+game = Mastermind::Game.new(STDOUT)
+game.start
bin/mastermind.bat
@@ -0,0 +1,1 @@
+@"ruby.exe" "%~dpn0" %*
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
.gitignore
@@ -0,0 +1,1 @@
+*.swp