diff options
author | José Valim <jose.valim@gmail.com> | 2009-12-23 13:30:58 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-12-23 13:30:58 +0100 |
commit | 74098e4cb6de01745db8f1d8d567645553ade7c5 (patch) | |
tree | 61998222e5d362991d50fdb68153414848410ae2 /activemodel/test/cases/validations_test.rb | |
parent | e31077c9aaec05bdf5ea0386eb42fcc039d86a0a (diff) | |
download | rails-74098e4cb6de01745db8f1d8d567645553ade7c5.tar.gz rails-74098e4cb6de01745db8f1d8d567645553ade7c5.tar.bz2 rails-74098e4cb6de01745db8f1d8d567645553ade7c5.zip |
No need to use ValidationsRepairHelper hack on ActiveModel anymore, Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there.
Diffstat (limited to 'activemodel/test/cases/validations_test.rb')
-rw-r--r-- | activemodel/test/cases/validations_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activemodel/test/cases/validations_test.rb b/activemodel/test/cases/validations_test.rb index 78565177d8..61910395b5 100644 --- a/activemodel/test/cases/validations_test.rb +++ b/activemodel/test/cases/validations_test.rb @@ -9,11 +9,12 @@ require 'models/custom_reader' class ValidationsTest < ActiveModel::TestCase include ActiveModel::TestsDatabase - include ActiveModel::ValidationsRepairHelper # Most of the tests mess with the validations of Topic, so lets repair it all the time. # Other classes we mess with will be dealt with in the specific tests - repair_validations(Topic) + def teardown + Topic.reset_callbacks(:validate) + end def test_single_field_validation r = Reply.new |