diff options
author | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-13 14:02:26 +0200 |
---|---|---|
committer | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-13 14:02:26 +0200 |
commit | d0ee883e7c01dabf039525b80b7f43673e987265 (patch) | |
tree | 989f55ba5e96b4b5d2e5514d0dd0998ebe876d16 /activerecord | |
parent | e3ecc3375fef4faa807638ff9e9cf309094272bd (diff) | |
download | rails-d0ee883e7c01dabf039525b80b7f43673e987265.tar.gz rails-d0ee883e7c01dabf039525b80b7f43673e987265.tar.bz2 rails-d0ee883e7c01dabf039525b80b7f43673e987265.zip |
fixing unit tests for active_record validations_i18n
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/validations_i18n_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/validations_i18n_test.rb b/activerecord/test/cases/validations_i18n_test.rb index bf0a4c9829..a0beb8be1b 100644 --- a/activerecord/test/cases/validations_i18n_test.rb +++ b/activerecord/test/cases/validations_i18n_test.rb @@ -46,14 +46,14 @@ class ActiveRecordValidationsI18nTests < Test::Unit::TestCase global_scope = [:active_record, :error_messages] custom_scope = global_scope + [:custom, 'topic', :title] - I18n.expects(:t).with nil, :scope => [:active_record, :error_messages], :default => [:"custom.topic.title.invalid", 'default from class def', :invalid] + I18n.expects(:t).with :"custom.topic.title.invalid", :scope => [:active_record, :error_messages], :default => ['default from class def', :invalid] @topic.errors.generate_message :title, :invalid, :default => 'default from class def' end def test_errors_generate_message_translates_custom_model_attribute_keys_with_sti custom_scope = [:active_record, :error_messages, :custom, 'topic', :title] - I18n.expects(:t).with nil, :scope => [:active_record, :error_messages], :default => [:"custom.reply.title.invalid", :"custom.topic.title.invalid", 'default from class def', :invalid] + I18n.expects(:t).with :"custom.reply.title.invalid", :scope => [:active_record, :error_messages], :default => [:"custom.topic.title.invalid", 'default from class def', :invalid] Reply.new.errors.generate_message :title, :invalid, :default => 'default from class def' end |