aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/association_callbacks_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-09-15 07:02:05 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-09-15 07:02:05 +0000
commit3f1acf49bd4cfa902388f000ca96c848c3666017 (patch)
treeaf197c1f4ea786e76da1f0679225572ea1953a58 /activerecord/test/association_callbacks_test.rb
parentd0c000ab9e90be4896744cb6ec107dffa573f2dd (diff)
downloadrails-3f1acf49bd4cfa902388f000ca96c848c3666017.tar.gz
rails-3f1acf49bd4cfa902388f000ca96c848c3666017.tar.bz2
rails-3f1acf49bd4cfa902388f000ca96c848c3666017.zip
Deprecation tests. Remove warnings for dynamic finders and for the foo_count ethod if it's also an attribute.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5116 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/association_callbacks_test.rb')
-rw-r--r--activerecord/test/association_callbacks_test.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/activerecord/test/association_callbacks_test.rb b/activerecord/test/association_callbacks_test.rb
index 1426fb71a9..d0f7fa67de 100644
--- a/activerecord/test/association_callbacks_test.rb
+++ b/activerecord/test/association_callbacks_test.rb
@@ -111,14 +111,16 @@ class AssociationCallbacksTest < Test::Unit::TestCase
end
def test_push_with_attributes
- david = developers(:david)
- activerecord = projects(:active_record)
- assert activerecord.developers_log.empty?
- activerecord.developers_with_callbacks.push_with_attributes(david, {})
- assert_equal ["before_adding#{david.id}", "after_adding#{david.id}"], activerecord.developers_log
- activerecord.developers_with_callbacks.push_with_attributes(david, {})
- assert_equal ["before_adding#{david.id}", "after_adding#{david.id}", "before_adding#{david.id}",
- "after_adding#{david.id}"], activerecord.developers_log
+ assert_deprecated 'push_with_attributes' do
+ david = developers(:david)
+ activerecord = projects(:active_record)
+ assert activerecord.developers_log.empty?
+ activerecord.developers_with_callbacks.push_with_attributes(david, {})
+ assert_equal ["before_adding#{david.id}", "after_adding#{david.id}"], activerecord.developers_log
+ activerecord.developers_with_callbacks.push_with_attributes(david, {})
+ assert_equal ["before_adding#{david.id}", "after_adding#{david.id}", "before_adding#{david.id}",
+ "after_adding#{david.id}"], activerecord.developers_log
+ end
end
end