From 133742d185c2abf0fb443b694a305a4b68259bcb Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 27 Sep 2010 16:51:12 -0700 Subject: @klass also uses DynamicFinderMatch, so no need for it on the relation --- activerecord/test/cases/relations_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activerecord/test/cases/relations_test.rb') diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 3bc3671b77..d642aeed8b 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -32,6 +32,11 @@ class RelationTest < ActiveRecord::TestCase assert_equal 5, Post.where(:id => post_authors).size end + def test_dynamic_finder + x = Post.where('author_id = ?', 1) + assert x.klass.respond_to?(:find_by_id), '@klass should handle dynamic finders' + end + def test_multivalue_where posts = Post.where('author_id = ? AND id = ?', 1, 1) assert_equal 1, posts.to_a.size -- cgit v1.2.3