]> source.dussan.org Git - redmine.git/commitdiff
fix unit test fails on Ruby 1.8 and JRuby (#2190)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 17 Jun 2012 09:34:12 +0000 (09:34 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 17 Jun 2012 09:34:12 +0000 (09:34 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9850 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/i18n_test.rb

index 85d9a13122fc9210fce03d1805eb631a278848c8..2ec6dc2f951820b9e122074f0e0f059e4beece70 100644 (file)
@@ -44,7 +44,9 @@ class Redmine::I18nTest < ActiveSupport::TestCase
     today = now = Time.parse('2011-02-20 14:00:00')
     Setting.date_format = '%d %B %Y'
     User.current.language = 'fr'
-    assert_equal "20 f\u00E9vrier 2011", format_date(today)
+    s1 = "20 f\xc3\xa9vrier 2011"
+    s1.force_encoding("UTF-8") if s1.respond_to?(:force_encoding)
+    assert_equal s1, format_date(today)
     User.current.language = nil
     assert_equal '20 Febrero 2011', format_date(today)
   end