spec/die_spec.rb in games_dice-0.3.7 vs spec/die_spec.rb in games_dice-0.3.8
- old
+ new
@@ -61,6 +61,22 @@
probs.expected.should be_within(1e-10).of 3.5
end
end
+ describe "#all_values" do
+ it "should return array with one result value per side" do
+ die = GamesDice::Die.new(8)
+ die.all_values.should == [1,2,3,4,5,6,7,8]
+ end
+ end
+
+ describe "#each_value" do
+ it "should iterate through all sides of the die" do
+ die = GamesDice::Die.new(10)
+ arr = []
+ die.each_value { |x| arr << x }
+ arr.should == [1,2,3,4,5,6,7,8,9,10]
+ end
+ end
+
end
\ No newline at end of file