Sha256: 4cafe7fc58e00af64e2560d273cdabacd70efc004a3d9722d477acf2ea58041a
Contents?: true
Size: 266 Bytes
Versions: 2
Compression:
Stored size: 266 Bytes
Contents
require "minitest/autorun" require "shenanigans/array/random_subarray" class RandomSubarray < Minitest::Test def test_random_subarray result = [*1..5].random_subarray(3) assert result.size == 3 assert result.map { |a| a.all? { |x| x < 5 } } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shenanigans-1.0.15 | test/array/random_subarray_test.rb |
shenanigans-1.0.14 | test/array/random_subarray_test.rb |