Commits

Chad Perrin committed ee07e2c

test_roll_die and test_roll in tests

Comments (0)

Files changed (1)

     test_droll = Droll.new('0d6')
     assert( !test_droll.send(:valid?) )
   end
+
+  def test_roll_die
+    # stub
+    test_droll = Droll.new('1d6')
+    roll_die_result = test_droll.send(:roll_die, '6', 'd', '6')
+    assert (0 < roll_die_result[0] and 7 > roll_die_result[0])
+  end
+
+  def test_roll
+    test_droll = Droll.new('1d6')
+    assert (0 < test_droll.roll.to_i and 7 > test_droll.roll.to_i)
+  end
 end