From 81d619ea0d7e936bdf5a643c8731e4b3f3746b8e Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 17 Sep 2007 21:19:44 +0000 Subject: Associations macros accept extension blocks alongside modules. Closes #9346. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7504 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/associations/extension_test.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'activerecord/test/associations') diff --git a/activerecord/test/associations/extension_test.rb b/activerecord/test/associations/extension_test.rb index e80a2b9fb9..67a9ee02ad 100644 --- a/activerecord/test/associations/extension_test.rb +++ b/activerecord/test/associations/extension_test.rb @@ -23,7 +23,12 @@ class AssociationsExtensionsTest < Test::Unit::TestCase assert_equal projects(:action_controller), developers(:david).projects_extended_by_name_twice.find_most_recent assert_equal projects(:active_record), developers(:david).projects_extended_by_name_twice.find_least_recent end - + + def test_named_extension_and_block_on_habtm + assert_equal projects(:action_controller), developers(:david).projects_extended_by_name_and_block.find_most_recent + assert_equal projects(:active_record), developers(:david).projects_extended_by_name_and_block.find_least_recent + end + def test_marshalling_extensions david = developers(:david) assert_equal projects(:action_controller), david.projects.find_most_recent -- cgit v1.2.3