From 08a99d0eac9370b590220953283475e00e3183e6 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Fri, 20 Mar 2009 21:40:37 +0000 Subject: Add I18n translations to ActiveModel and move more AR specific parts to ActiveRecord::Validations --- activemodel/test/cases/validations/length_validation_test.rb | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'activemodel/test/cases/validations/length_validation_test.rb') diff --git a/activemodel/test/cases/validations/length_validation_test.rb b/activemodel/test/cases/validations/length_validation_test.rb index e84e2815fa..ab725d9e1f 100644 --- a/activemodel/test/cases/validations/length_validation_test.rb +++ b/activemodel/test/cases/validations/length_validation_test.rb @@ -200,17 +200,6 @@ class LengthValidationTest < ActiveModel::TestCase end end - def test_validates_length_with_globally_modified_error_message - ActiveSupport::Deprecation.silence do - ActiveModel::Errors.default_error_messages[:too_short] = 'tu est trops petit hombre {{count}}' - end - Topic.validates_length_of :title, :minimum => 10 - t = Topic.create(:title => 'too short') - assert !t.valid? - - assert_equal ['tu est trops petit hombre 10'], t.errors[:title] - end - def test_validates_length_of_nasty_params assert_raise(ArgumentError) { Topic.validates_length_of(:title, :minimum=>6, :maximum=>9) } assert_raise(ArgumentError) { Topic.validates_length_of(:title, :within=>6, :maximum=>9) } -- cgit v1.2.3