1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Ruby 1.9 compat: fix test error masked by old String#each behavior

This commit is contained in:
Jeremy Kemper 2008-08-25 18:16:21 -07:00
parent 5e1ceb153c
commit 1c54ca4f75

View file

@ -133,7 +133,7 @@ class ActiveRecordValidationsI18nTests < Test::Unit::TestCase
end
def test_errors_full_messages_translates_human_attribute_name_for_model_attributes
@topic.errors.instance_variable_set :@errors, { 'title' => 'empty' }
@topic.errors.instance_variable_set :@errors, { 'title' => ['empty'] }
I18n.expects(:translate).with(:"topic.title", :default => ['Title'], :scope => [:activerecord, :attributes], :count => 1).returns('Title')
@topic.errors.full_messages :locale => 'en-US'
end