From 801baeed69fb5b28d9a05b657addb8f4204794ed Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Mon, 27 Jan 2014 08:22:26 -0200 Subject: Use the new clear_validators! api to reset validators in tests --- activemodel/test/cases/validations/with_validation_test.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activemodel/test/cases/validations/with_validation_test.rb') diff --git a/activemodel/test/cases/validations/with_validation_test.rb b/activemodel/test/cases/validations/with_validation_test.rb index 93716f1433..736c2deea8 100644 --- a/activemodel/test/cases/validations/with_validation_test.rb +++ b/activemodel/test/cases/validations/with_validation_test.rb @@ -6,8 +6,7 @@ require 'models/topic' class ValidatesWithTest < ActiveModel::TestCase def teardown - Topic.reset_callbacks(:validate) - Topic._validators.clear + Topic.clear_validators! end ERROR_MESSAGE = "Validation error from validator" -- cgit v1.2.3