From 66b49c634d2b2d8e9f876ce711ffc355cc125139 2011-12-09 07:14:38 From: Toshi MARUYAMA Date: 2011-12-09 07:14:38 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 --- diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb index c1e0624..ad0fc9f 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