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 /activerecord/test/cases/autosave_association_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 'activerecord/test/cases/autosave_association_test.rb')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index cf763d730a..116c8fc509 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -974,9 +974,9 @@ module AutosaveAssociationOnACollectionAssociationTests end def test_should_default_invalid_error_from_i18n - I18n.backend.store_translations(:en, :activerecord => { :errors => { :models => + I18n.backend.store_translations(:en, :errors => { :models => { @association_name.to_s.singularize.to_sym => { :blank => "cannot be blank" } } - }}) + }) @pirate.send(@association_name).build(:name => '') @@ -985,9 +985,7 @@ module AutosaveAssociationOnACollectionAssociationTests assert_equal ["#{@association_name.to_s.titleize} name cannot be blank"], @pirate.errors.full_messages assert @pirate.errors[@association_name].empty? ensure - I18n.backend.store_translations(:en, :activerecord => { :errors => { :models => - { @association_name.to_s.singularize.to_sym => nil } - }}) + I18n.backend = I18n::Backend::Simple.new end def test_should_merge_errors_on_the_associated_models_onto_the_parent_even_if_it_is_not_valid |