From 3f1acf49bd4cfa902388f000ca96c848c3666017 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 15 Sep 2006 07:02:05 +0000 Subject: 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 --- activerecord/test/association_callbacks_test.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'activerecord/test/association_callbacks_test.rb') 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 -- cgit v1.2.3