提交 1c54ca4f 编写于 作者: J Jeremy Kemper

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

上级 5e1ceb15
......@@ -133,7 +133,7 @@ def test_errors_add_on_blank_generates_message_with_custom_default_message
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册