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:
parent
77177441d1
commit
8461526f34
1 changed files with 3 additions and 1 deletions
|
@ -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?
|
||||
|
|
Loading…
Reference in a new issue