1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

add activerecord tests for deprecation of %s and %d in error messages (and translations in general)

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
Sven Fuchs 2008-09-11 00:35:58 +02:00 committed by Jeremy Kemper
parent 79c8b104d6
commit 31dcd78111

View file

@ -40,6 +40,18 @@ class ActiveRecordValidationsI18nTests < Test::Unit::TestCase
end
end
def test_percent_s_interpolation_syntax_in_error_messages_is_deprecated
assert_deprecated('using %s in messages') do
I18n.t :does_not_exist, :default => "%s interpolation syntax is deprected", :value => 'this'
end
end
def test_percent_d_interpolation_syntax_in_error_messages_is_deprecated
assert_deprecated('using %d in messages') do
I18n.t :does_not_exist, :default => "%d interpolation syntax is deprected", :count => 1
end
end
# ActiveRecord::Errors
uses_mocha 'ActiveRecord::Errors' do