Permalink
Browse files

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

  • Loading branch information...
1 parent 5e1ceb1 commit 1c54ca4f75f9c761ee0f721c38cc4f315ac5ee01 @jeremy jeremy committed Aug 26, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/test/cases/validations_i18n_test.rb
@@ -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

0 comments on commit 1c54ca4

Please sign in to comment.