Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. class Output
  2. def messages
  3. @messages ||= []
  4. end
  5.  
  6. def puts(message)
  7. messages << message
  8. end
  9. end
  10.  
  11.  
  12. def output
  13. @output ||= Output.new
  14. end
  15.  
  16.  
  17. Given(/^I am not yet playing$/) do
  18. end
  19.  
  20. When(/^I start a new game$/) do
  21. game = Codebreaker::Game.new(output)
  22. game.start
  23. end
  24.  
  25. Then(/^I should see "(.*?)"$/) do |message|
  26. output.messages.should include(message)
  27. end
  28.  
  29.  
  30. Given(/^the secret code is "(.*?)"$/) do |arg1|
  31.  
  32. end
  33.  
  34.  
  35. When(/^I guess "(.*?)"$/) do |arg1|
  36.  
  37. end
  38.  
  39.  
  40. Then(/^the mark should be "(.*?)"$/) do |arg1|
  41.  
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement