diff options
author | Marc-Andre Lafortune <github@marc-andre.ca> | 2014-02-04 01:57:27 -0500 |
---|---|---|
committer | Marc-Andre Lafortune <github@marc-andre.ca> | 2014-02-05 16:45:55 -0500 |
commit | 39b2cc1900b0cb10057d46d7e2ed54f8e0b1e26f (patch) | |
tree | 60ffae6396be85659791ba2154465a480998aabb /activesupport | |
parent | 4c3e11d30a9295404c54646a5d0c8a47991c35d4 (diff) | |
download | rails-39b2cc1900b0cb10057d46d7e2ed54f8e0b1e26f.tar.gz rails-39b2cc1900b0cb10057d46d7e2ed54f8e0b1e26f.tar.bz2 rails-39b2cc1900b0cb10057d46d7e2ed54f8e0b1e26f.zip |
Remove obsolete test (builtin group_by is now used)
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/core_ext/enumerable_test.rb | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/activesupport/test/core_ext/enumerable_test.rb b/activesupport/test/core_ext/enumerable_test.rb index 6c32622e71..6b3e8364c5 100644 --- a/activesupport/test/core_ext/enumerable_test.rb +++ b/activesupport/test/core_ext/enumerable_test.rb @@ -20,26 +20,6 @@ class EnumerableTests < ActiveSupport::TestCase end end - def test_group_by - names = %w(marcel sam david jeremy) - klass = Struct.new(:name) - objects = (1..50).map do - klass.new names.sample - end - - enum = GenericEnumerable.new(objects) - grouped = enum.group_by { |object| object.name } - - grouped.each do |name, group| - assert group.all? { |person| person.name == name } - end - - assert_equal objects.uniq.map(&:name), grouped.keys - assert({}.merge(grouped), "Could not convert ActiveSupport::OrderedHash into Hash") - assert_equal Enumerator, enum.group_by.class - assert_equal grouped, enum.group_by.each(&:name) - end - def test_sums enum = GenericEnumerable.new([5, 15, 10]) assert_equal 30, enum.sum |