diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-01-27 08:22:26 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-01-27 08:26:54 -0200 |
commit | 801baeed69fb5b28d9a05b657addb8f4204794ed (patch) | |
tree | 073a0357836cc6f930b21cf372490a023c3e907e /activemodel/test/cases/validations_test.rb | |
parent | 5336ce265a75d3e472bf801e04cac48ee16d9a76 (diff) | |
download | rails-801baeed69fb5b28d9a05b657addb8f4204794ed.tar.gz rails-801baeed69fb5b28d9a05b657addb8f4204794ed.tar.bz2 rails-801baeed69fb5b28d9a05b657addb8f4204794ed.zip |
Use the new clear_validators! api to reset validators in tests
Diffstat (limited to 'activemodel/test/cases/validations_test.rb')
-rw-r--r-- | activemodel/test/cases/validations_test.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/activemodel/test/cases/validations_test.rb b/activemodel/test/cases/validations_test.rb index 039b6b8872..bee8ece992 100644 --- a/activemodel/test/cases/validations_test.rb +++ b/activemodel/test/cases/validations_test.rb @@ -10,17 +10,10 @@ require 'active_support/json' require 'active_support/xml_mini' class ValidationsTest < ActiveModel::TestCase - class CustomStrictValidationException < StandardError; end - def setup - Topic._validators.clear - end - - # 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 def teardown - Topic.reset_callbacks(:validate) + Topic.clear_validators! end def test_single_field_validation |