diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-09-17 21:19:44 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-09-17 21:19:44 +0000 |
commit | 81d619ea0d7e936bdf5a643c8731e4b3f3746b8e (patch) | |
tree | 34aef34ef446db68d9122cde405c7e75bf771101 /activerecord/test/associations | |
parent | 6b1901da8f2db638884d3e51f84d4392775e7667 (diff) | |
download | rails-81d619ea0d7e936bdf5a643c8731e4b3f3746b8e.tar.gz rails-81d619ea0d7e936bdf5a643c8731e4b3f3746b8e.tar.bz2 rails-81d619ea0d7e936bdf5a643c8731e4b3f3746b8e.zip |
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
Diffstat (limited to 'activerecord/test/associations')
-rw-r--r-- | activerecord/test/associations/extension_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
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 |