diff options
author | José Valim <jose.valim@gmail.com> | 2009-09-08 10:10:14 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-09-08 10:26:39 -0500 |
commit | 4f37b97033f596ec2c95eb53e9964e051c224981 (patch) | |
tree | b7dd859f4d1b1835178eec795711f8619963c23c /activerecord/test/cases/validations_test.rb | |
parent | aeab739bd56c0bff6d1b5685eee35e557484ab4c (diff) | |
download | rails-4f37b97033f596ec2c95eb53e9964e051c224981.tar.gz rails-4f37b97033f596ec2c95eb53e9964e051c224981.tar.bz2 rails-4f37b97033f596ec2c95eb53e9964e051c224981.zip |
Changed ActiveRecord to use new callbacks and speed up observers by only notifying events that are actually being consumed.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'activerecord/test/cases/validations_test.rb')
-rw-r--r-- | activerecord/test/cases/validations_test.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/activerecord/test/cases/validations_test.rb b/activerecord/test/cases/validations_test.rb index a4e874e5e6..6fd7fe6a21 100644 --- a/activerecord/test/cases/validations_test.rb +++ b/activerecord/test/cases/validations_test.rb @@ -161,12 +161,9 @@ class ValidationsTest < ActiveRecord::TestCase end def test_validates_acceptance_of_as_database_column - repair_validations(Reply) do - Reply.validates_acceptance_of(:author_name) - - reply = Reply.create("author_name" => "Dan Brown") - assert_equal "Dan Brown", reply["author_name"] - end + Topic.validates_acceptance_of(:author_name) + topic = Topic.create("author_name" => "Dan Brown") + assert_equal "Dan Brown", topic["author_name"] end def test_deprecated_validation_instance_methods |