mirror of
https://github.com/github/rails.git
synced 2026-01-29 00:08:15 -05:00
silence deprecation warning during validations test
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user