Browse files

Further simplify enumerable group_by test

  • Loading branch information...
1 parent a137580 commit 363c08fa6033a53c1fed18288921c98e70484064 @carlosantoniodasilva carlosantoniodasilva committed Apr 4, 2013
Showing with 1 addition and 3 deletions.
  1. +1 −3 activesupport/test/core_ext/enumerable_test.rb
View
4 activesupport/test/core_ext/enumerable_test.rb
@@ -25,9 +25,7 @@ def test_group_by
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)

0 comments on commit 363c08f

Please sign in to comment.