aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2006-05-21 01:42:36 +0000
committerNicholas Seckar <nseckar@gmail.com>2006-05-21 01:42:36 +0000
commit04fb7c30e36432602c849409c020da8f5bcfe9aa (patch)
treed3e9daf3547c9f4278d14377ae048b6233dbd3df /activesupport/test
parentc50113bc6110624bd411466e7c36bdde23226959 (diff)
downloadrails-04fb7c30e36432602c849409c020da8f5bcfe9aa.tar.gz
rails-04fb7c30e36432602c849409c020da8f5bcfe9aa.tar.bz2
rails-04fb7c30e36432602c849409c020da8f5bcfe9aa.zip
Remove Enumerable#first_match in favor of using break(result_for_each)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/enumerable_test.rb10
1 files changed, 0 insertions, 10 deletions
diff --git a/activesupport/test/core_ext/enumerable_test.rb b/activesupport/test/core_ext/enumerable_test.rb
index 6ca41f9116..df14200e42 100644
--- a/activesupport/test/core_ext/enumerable_test.rb
+++ b/activesupport/test/core_ext/enumerable_test.rb
@@ -3,16 +3,6 @@ require File.dirname(__FILE__) + '/../../lib/active_support/core_ext/enumerable'
class EnumerableTests < Test::Unit::TestCase
- def test_first_match_no_match
- [[1, 2, 3, 4, 5], (1..9)].each {|a| a.first_match {|x| x > 10}}
- end
-
- def test_first_match_with_match
- assert_equal true, [1, 2, 3, 4, 5, 6].first_match {|x| x > 4}
- assert_equal true, (1..10).first_match {|x| x > 9}
- assert_equal :aba, {:a => 10, :aba => 50, :bac => 40}.first_match {|k, v| k if v > 45}
- end
-
def test_group_by
names = %w(marcel sam david jeremy)
klass = Class.new