Skip to content
Browse files

silence deprecation warning during validations test

  • Loading branch information...
1 parent 7717744 commit 8461526f346b8d8387ba3b74221fbeefef3aefeb @svenfuchs svenfuchs committed Jun 23, 2008
Showing with 3 additions and 1 deletion.
  1. +3 −1 activerecord/test/cases/validations_test.rb
View
4 activerecord/test/cases/validations_test.rb
@@ -853,7 +853,9 @@ def test_validates_length_of_using_bignum
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?

0 comments on commit 8461526

Please sign in to comment.
Something went wrong with that request. Please try again.