1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

silence deprecation warning during validations test

This commit is contained in:
Sven Fuchs 2008-06-23 14:55:07 +02:00
parent 77177441d1
commit 8461526f34

View file

@ -853,7 +853,9 @@ class ValidationsTest < ActiveRecord::TestCase
end
def test_validates_length_with_globally_modified_error_message
ActiveRecord::Errors.default_error_messages[:too_short] = 'tu est trops petit hombre %d'
ActiveSupport::Deprecation.silence do
ActiveRecord::Errors.default_error_messages[:too_short] = 'tu est trops petit hombre %d'
end
Topic.validates_length_of :title, :minimum => 10
t = Topic.create(:title => 'too short')
assert !t.valid?