spec/helpers.rb in games_dice-0.3.7 vs spec/helpers.rb in games_dice-0.3.8

- old
+ new

@@ -1,7 +1,15 @@ # games_dice/spec/helpers.rb +require 'pathname' +require 'coveralls' +Coveralls.wear! + +def fixture name + (Pathname.new(__FILE__).dirname + "fixtures" + name).to_s +end + # TestPRNG tests short predictable series class TestPRNG def initialize @numbers = [0.123,0.234,0.345,0.999,0.876,0.765,0.543,0.111,0.333,0.777] end @@ -15,10 +23,10 @@ def rand(n) Integer( n ) - 1 end end -# TestPRNGMax checks behaviour of re-rolls +# TestPRNGMin checks behaviour of re-rolls class TestPRNGMin def rand(n) 1 end end