diff options
author | Ryan Bates <ryan@railscasts.com> | 2008-08-21 12:37:19 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-08-21 12:37:19 +0100 |
commit | 2415652660242d6b0da97119c562ecff82928575 (patch) | |
tree | e3df086ee9f4e7c564abf9c826fdb08f40746a69 /activerecord/test/cases | |
parent | 6be8251ec86b74b92e7bd922fafe9224281d2d26 (diff) | |
download | rails-2415652660242d6b0da97119c562ecff82928575.tar.gz rails-2415652660242d6b0da97119c562ecff82928575.tar.bz2 rails-2415652660242d6b0da97119c562ecff82928575.zip |
Support find_all on named scopes. [#730 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/named_scope_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/named_scope_test.rb b/activerecord/test/cases/named_scope_test.rb index bd6ec23853..7cc51f5d68 100644 --- a/activerecord/test/cases/named_scope_test.rb +++ b/activerecord/test/cases/named_scope_test.rb @@ -238,4 +238,8 @@ class NamedScopeTest < ActiveRecord::TestCase assert topic.approved assert_equal 'lifo', topic.author_name end + + def test_find_all_should_behave_like_select + assert_equal Topic.base.select(&:approved), Topic.base.find_all(&:approved) + end end |