From 36d1a2f302817815e0e70334733d2daf1a14a4f5 Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Wed, 17 May 2006 05:12:53 +0000 Subject: Make Array#in_groups_of just return the grouped collection if a block isn't given. [Marcel Molina Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4345 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/array_ext_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activesupport/test') diff --git a/activesupport/test/core_ext/array_ext_test.rb b/activesupport/test/core_ext/array_ext_test.rb index caf3af2345..0d5f58a9be 100644 --- a/activesupport/test/core_ext/array_ext_test.rb +++ b/activesupport/test/core_ext/array_ext_test.rb @@ -47,6 +47,7 @@ class ArrayExtGroupingTests < Test::Unit::TestCase end assert_equal [%w(a b c), %w(d e f), %w(g h i)], groups + assert_equal [%w(a b c), %w(d e f), %w(g h i)], ('a'..'i').to_a.in_groups_of(3) end def test_group_by_with_padding @@ -122,4 +123,4 @@ class ArrayToXmlTests < Test::Unit::TestCase assert xml.include?(%(Evergreen)) assert xml.include?(%(Jason)) end -end \ No newline at end of file +end -- cgit v1.2.3