aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations/with_validation_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-12-23 13:30:58 +0100
committerJosé Valim <jose.valim@gmail.com>2009-12-23 13:30:58 +0100
commit74098e4cb6de01745db8f1d8d567645553ade7c5 (patch)
tree61998222e5d362991d50fdb68153414848410ae2 /activemodel/test/cases/validations/with_validation_test.rb
parente31077c9aaec05bdf5ea0386eb42fcc039d86a0a (diff)
downloadrails-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/with_validation_test.rb')
-rw-r--r--activemodel/test/cases/validations/with_validation_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activemodel/test/cases/validations/with_validation_test.rb b/activemodel/test/cases/validations/with_validation_test.rb
index 953ff8aa2d..9e9b925df2 100644
--- a/activemodel/test/cases/validations/with_validation_test.rb
+++ b/activemodel/test/cases/validations/with_validation_test.rb
@@ -6,9 +6,10 @@ require 'models/topic'
class ValidatesWithTest < ActiveRecord::TestCase
include ActiveModel::TestsDatabase
- include ActiveModel::ValidationsRepairHelper
- repair_validations(Topic)
+ def teardown
+ Topic.reset_callbacks(:validate)
+ end
ERROR_MESSAGE = "Validation error from validator"
OTHER_ERROR_MESSAGE = "Validation error from other validator"