aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/validations_i18n_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/cases/validations_i18n_test.rb b/activerecord/test/cases/validations_i18n_test.rb
index 090f347a20..4d23321ede 100644
--- a/activerecord/test/cases/validations_i18n_test.rb
+++ b/activerecord/test/cases/validations_i18n_test.rb
@@ -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