diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-26 17:13:52 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-26 17:13:52 +0000 |
commit | 768d67f27bf6804ec52afae7cefc2724ff9af654 (patch) | |
tree | f3a2b0e67979077d9a06e95d56c4a8323d342641 /test/unit/lib | |
parent | 1781d87477e07b441fe3de19e8aea08b98ea0fe7 (diff) | |
download | redmine-768d67f27bf6804ec52afae7cefc2724ff9af654.tar.gz redmine-768d67f27bf6804ec52afae7cefc2724ff9af654.zip |
Workaround for i18n 0.4.x with the old style syntax. #6428 #5608
This will also silance the whole trace with the deprecation warning.
Contributed by Felix Schäfer
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4183 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib')
-rw-r--r-- | test/unit/lib/redmine/i18n_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/lib/redmine/i18n_test.rb b/test/unit/lib/redmine/i18n_test.rb index 666bd7481..df1942e95 100644 --- a/test/unit/lib/redmine/i18n_test.rb +++ b/test/unit/lib/redmine/i18n_test.rb @@ -29,7 +29,7 @@ class Redmine::I18nTest < ActiveSupport::TestCase set_language_if_valid 'en' today = Date.today Setting.date_format = '' - assert_equal I18n.l(today), format_date(today) + assert_equal I18n.l(today, :count => today.strftime('%d')), format_date(today) end def test_date_format @@ -47,7 +47,7 @@ class Redmine::I18nTest < ActiveSupport::TestCase format_date(Date.today) format_time(Time.now) format_time(Time.now, false) - assert_not_equal 'default', ::I18n.l(Date.today, :format => :default), "date.formats.default missing in #{lang}" + assert_not_equal 'default', ::I18n.l(Date.today, :count => Date.today.strftime('%d'), :format => :default), "date.formats.default missing in #{lang}" assert_not_equal 'time', ::I18n.l(Time.now, :format => :time), "time.formats.time missing in #{lang}" end assert l('date.day_names').is_a?(Array) @@ -63,8 +63,8 @@ class Redmine::I18nTest < ActiveSupport::TestCase now = Time.now Setting.date_format = '' Setting.time_format = '' - assert_equal I18n.l(now), format_time(now) - assert_equal I18n.l(now, :format => :time), format_time(now, false) + assert_equal I18n.l(now, :count => now.strftime('%d')), format_time(now) + assert_equal I18n.l(now, :count => now.strftime('%d'), :format => :time), format_time(now, false) end def test_time_format |