lib/bunny/test_kit.rb in bunny-0.9.0.pre13 vs lib/bunny/test_kit.rb in bunny-0.9.0.rc1
- old
+ new
@@ -8,13 +8,14 @@
# @api private
def random_in_range(a, b)
Range.new(a, b).to_a.sample
end
- # @param [Integer] Lower bound of message size, in KB
- # @param [Integer] Upper bound of message size, in KB
- # @param [Integer] Random number to use in message generation
+ # @param [Integer] a Lower bound of message size, in KB
+ # @param [Integer] b Upper bound of message size, in KB
+ # @param [Integer] i Random number to use in message generation
# @return [String] Message payload of length in the given range, with non-ASCII characters
+ # @api public
def message_in_kb(a, b, i)
s = "Ю#{i}"
n = random_in_range(a, b) / s.bytesize
s * n * 1024