diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-04-04 12:36:17 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-04-04 12:36:17 -0300 |
commit | 363c08fa6033a53c1fed18288921c98e70484064 (patch) | |
tree | ad41a02d8c07ccbde0a63c50e58e81991cd40613 /activesupport/test/core_ext | |
parent | a13758007d248ce856e0d9c9978feafb5c1d8bb9 (diff) | |
download | rails-363c08fa6033a53c1fed18288921c98e70484064.tar.gz rails-363c08fa6033a53c1fed18288921c98e70484064.tar.bz2 rails-363c08fa6033a53c1fed18288921c98e70484064.zip |
Further simplify enumerable group_by test
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/enumerable_test.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activesupport/test/core_ext/enumerable_test.rb b/activesupport/test/core_ext/enumerable_test.rb index a00b2dcf35..6781e3c20e 100644 --- a/activesupport/test/core_ext/enumerable_test.rb +++ b/activesupport/test/core_ext/enumerable_test.rb @@ -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) |