aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations_extensions_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-11-04 19:39:50 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-11-04 19:39:50 +0000
commita5a82d978bd4a46ce73462a0adcb031aa5919ce4 (patch)
tree4ca0d93e5516f33053af1fdca568607921c34842 /activerecord/test/associations_extensions_test.rb
parent4506a463e4af0c7b8fb7fddea1c666520d895271 (diff)
downloadrails-a5a82d978bd4a46ce73462a0adcb031aa5919ce4.tar.gz
rails-a5a82d978bd4a46ce73462a0adcb031aa5919ce4.tar.bz2
rails-a5a82d978bd4a46ce73462a0adcb031aa5919ce4.zip
Added extension capabilities to has_many and has_and_belongs_to_many proxies [DHH] Added find_or_create_by_X as a second type of dynamic finder that'll create the record if it doesn't already exist [DHH] Added constrain scoping for creates using a hash of attributes bound to the :creation key [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/associations_extensions_test.rb')
-rw-r--r--activerecord/test/associations_extensions_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/associations_extensions_test.rb b/activerecord/test/associations_extensions_test.rb
index 92bdb86eb5..fa9674a149 100644
--- a/activerecord/test/associations_extensions_test.rb
+++ b/activerecord/test/associations_extensions_test.rb
@@ -1,9 +1,11 @@
require 'abstract_unit'
+require 'fixtures/post'
+require 'fixtures/comment'
require 'fixtures/project'
require 'fixtures/developer'
class AssociationsExtensionsTest < Test::Unit::TestCase
- fixtures :projects, :developers
+ fixtures :projects, :developers, :comments, :posts
def test_extension_on_habtm
assert_equal projects(:action_controller), developers(:david).projects.find_most_recent