Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove obsolete test (builtin group_by is now used)

  • Loading branch information...
commit 39b2cc1900b0cb10057d46d7e2ed54f8e0b1e26f 1 parent 4c3e11d
Marc-André Lafortune marcandre authored
Showing with 0 additions and 20 deletions.
  1. +0 −20 activesupport/test/core_ext/enumerable_test.rb
20 activesupport/test/core_ext/enumerable_test.rb
View
@@ -20,26 +20,6 @@ def each
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
Please sign in to comment.
Something went wrong with that request. Please try again.