liars_dice 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/liars_dice.gemspec +1 -1
- data/lib/liars_dice/engine.rb +1 -1
- data/spec/engine_spec.rb +3 -3
- metadata +1 -1
data/liars_dice.gemspec
CHANGED
data/lib/liars_dice/engine.rb
CHANGED
data/spec/engine_spec.rb
CHANGED
@@ -326,7 +326,7 @@ describe "Engine" do
|
|
326
326
|
before do
|
327
327
|
# Roll the dice a bunch of times and capture the result in a hash
|
328
328
|
# keyed by die face_value
|
329
|
-
engine.stub(:
|
329
|
+
engine.stub(:seats).and_return([seat])
|
330
330
|
seat.stub(:dice_left).and_return(6000)
|
331
331
|
rolled_dice = []
|
332
332
|
seat.stub(:dice=) { |val| rolled_dice = val }
|
@@ -347,13 +347,13 @@ describe "Engine" do
|
|
347
347
|
end
|
348
348
|
end
|
349
349
|
|
350
|
-
it "
|
350
|
+
it "rolls dice for all seats" do
|
351
351
|
s1 = Seat.new(0, {}, 5)
|
352
352
|
s1.stub(:alive?).and_return(false)
|
353
353
|
s2 = Seat.new(1, {}, 5)
|
354
354
|
s2.stub(:alive?).and_return(true)
|
355
355
|
engine.stub(:seats).and_return([s1, s2])
|
356
|
-
s1.
|
356
|
+
s1.should_receive(:dice=)
|
357
357
|
s2.should_receive(:dice=)
|
358
358
|
engine.roll_dice
|
359
359
|
end
|