blob: dd50e4892eeca6709b137d670a71118c95b369a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# game_spec.rb
require File.join(File.dirname(__FILE__), "/../spec_helper")
module Mastermind
describe Game do
context "starting up" do
before(:each) do
@messenger = mock("messenger").as_null_object
@game = Game.new(@messenger)
end
it "should send a welcome message" do
@messenger.should_receive(:puts).with("Welcome to Mastermind!")
@game.start
end
it "should prompt for the first guess" do
@messenger.should_receive(:puts).with("Enter guess:")
@game.start
end
end
end
end
|