diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-07 01:04:25 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-07 15:31:49 +0100 |
commit | 190ce3ab37966957997cd18772d1260bf121c2e0 (patch) | |
tree | 55598ff271dea3c93b54823f9f5f2ec96b9cfef2 /activemodel/test/cases/validations/i18n_generate_message_validation_test.rb | |
parent | a323b83acfe6e02812ec3b7b4ce912b07c85220e (diff) | |
download | rails-190ce3ab37966957997cd18772d1260bf121c2e0.tar.gz rails-190ce3ab37966957997cd18772d1260bf121c2e0.tar.bz2 rails-190ce3ab37966957997cd18772d1260bf121c2e0.zip |
Errors messages are now moved from :activerecord.errors to simply :errors on I18n yml files.
Diffstat (limited to 'activemodel/test/cases/validations/i18n_generate_message_validation_test.rb')
-rw-r--r-- | activemodel/test/cases/validations/i18n_generate_message_validation_test.rb | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb b/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb index 54b2405c92..6116ef71d4 100644 --- a/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb +++ b/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb @@ -7,42 +7,6 @@ class I18nGenerateMessageValidationTest < ActiveModel::TestCase def setup Person.reset_callbacks(:validate) @person = Person.new - - @old_load_path, @old_backend = I18n.load_path, I18n.backend - I18n.load_path.clear - I18n.backend = I18n::Backend::Simple.new - - I18n.backend.store_translations :'en', { - :activemodel => { - :errors => { - :messages => { - :inclusion => "is not included in the list", - :exclusion => "is reserved", - :invalid => "is invalid", - :confirmation => "doesn't match confirmation", - :accepted => "must be accepted", - :empty => "can't be empty", - :blank => "can't be blank", - :too_long => "is too long (maximum is {{count}} characters)", - :too_short => "is too short (minimum is {{count}} characters)", - :wrong_length => "is the wrong length (should be {{count}} characters)", - :not_a_number => "is not a number", - :greater_than => "must be greater than {{count}}", - :greater_than_or_equal_to => "must be greater than or equal to {{count}}", - :equal_to => "must be equal to {{count}}", - :less_than => "must be less than {{count}}", - :less_than_or_equal_to => "must be less than or equal to {{count}}", - :odd => "must be odd", - :even => "must be even" - } - } - } - } - end - - def teardown - I18n.load_path.replace @old_load_path - I18n.backend = @old_backend end # validates_inclusion_of: generate_message(attr_name, :inclusion, :default => configuration[:message], :value => value) |