From 66b49c634d2b2d8e9f876ce711ffc355cc125139 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 9 Dec 2011 07:14:38 +0000 Subject: [PATCH] Rails3: test: replace deprecated Errors#on to Errors#[] and join with to_s at test/unit/repository_test.rb On Rails2, Errors#[] returns single error if one error raises. But, on Rails3, Errors#[] always returns the array. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8135 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/repository_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb index c1e062495..ad0fc9f5f 100644 --- a/test/unit/repository_test.rb +++ b/test/unit/repository_test.rb @@ -68,7 +68,7 @@ class RepositoryTest < ActiveSupport::TestCase :project => Project.find(3), :url => "svn://localhost") assert !repository.save assert_equal I18n.translate('activerecord.errors.messages.invalid'), - repository.errors.on(:type) + repository.errors[:type].to_s end end