1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Further simplify enumerable group_by test

This commit is contained in:
Carlos Antonio da Silva 2013-04-04 12:36:17 -03:00
parent a13758007d
commit 363c08fa60

View file

@ -25,9 +25,7 @@ class EnumerableTests < ActiveSupport::TestCase
names = %w(marcel sam david jeremy)
klass = Struct.new(:name)
objects = (1..50).map do
p = klass.new
p.name = names.sort_by { rand }.first
p
klass.new names.sample
end
enum = GenericEnumerable.new(objects)