aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2011-07-23 15:38:55 -0400
committerMarc-Andre Lafortune <github@marc-andre.ca>2011-07-23 15:52:37 -0400
commita96e824c5388ed756685a041578688a7e14a8247 (patch)
treed3c4126222faf86fad8d479a0edd41072d075898 /activesupport/test/core_ext
parentf6ac022a6fa7ac68106ef8a85f2ce9b2465ef6e2 (diff)
downloadrails-a96e824c5388ed756685a041578688a7e14a8247.tar.gz
rails-a96e824c5388ed756685a041578688a7e14a8247.tar.bz2
rails-a96e824c5388ed756685a041578688a7e14a8247.zip
Make Enumerable#many? not rely on #size
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/enumerable_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/enumerable_test.rb b/activesupport/test/core_ext/enumerable_test.rb
index 9720b06f65..688207c91c 100644
--- a/activesupport/test/core_ext/enumerable_test.rb
+++ b/activesupport/test/core_ext/enumerable_test.rb
@@ -89,7 +89,7 @@ class EnumerableTests < Test::Unit::TestCase
def test_index_by
payments = GenericEnumerable.new([ Payment.new(5), Payment.new(15), Payment.new(10) ])
- assert_equal({ 5 => payments[0], 15 => payments[1], 10 => payments[2] },
+ assert_equal({ 5 => Payment.new(5), 15 => Payment.new(15), 10 => Payment.new(10) },
payments.index_by { |p| p.price })
end