diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-12 17:58:37 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-13 11:43:03 -0700 |
commit | a7ccc7c79fa69cea3b7d19bcaa4df3c2932238d8 (patch) | |
tree | 6c438a9d0a89e22c6fcd5a22ebfc6fe74149c4bb /activerecord/test/cases | |
parent | e9c5750bd1bb15b2d551ee014f06bd5019f2357d (diff) | |
download | rails-a7ccc7c79fa69cea3b7d19bcaa4df3c2932238d8.tar.gz rails-a7ccc7c79fa69cea3b7d19bcaa4df3c2932238d8.tar.bz2 rails-a7ccc7c79fa69cea3b7d19bcaa4df3c2932238d8.zip |
Remove support for deprecated validation message interpolation format
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/validations_i18n_test.rb | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/activerecord/test/cases/validations_i18n_test.rb b/activerecord/test/cases/validations_i18n_test.rb index 66982346e9..20d1369a64 100644 --- a/activerecord/test/cases/validations_i18n_test.rb +++ b/activerecord/test/cases/validations_i18n_test.rb @@ -38,35 +38,17 @@ class ActiveRecordValidationsI18nTests < ActiveSupport::TestCase end end - def test_default_error_messages_is_deprecated - assert_deprecated('ActiveRecord::Errors.default_error_messages') do - ActiveRecord::Errors.default_error_messages + def test_percent_s_interpolation_syntax_in_error_messages_was_deprecated + assert_not_deprecated do + default = "%s interpolation syntax was deprecated" + assert_equal default, I18n.t(:does_not_exist, :default => default, :value => 'this') end end - def test_percent_s_interpolation_syntax_in_error_messages_still_works - ActiveSupport::Deprecation.silence do - result = I18n.t :does_not_exist, :default => "%s interpolation syntax is deprecated", :value => 'this' - assert_equal result, "this interpolation syntax is deprecated" - 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_still_works - ActiveSupport::Deprecation.silence do - result = I18n.t :does_not_exist, :default => "%d interpolation syntaxes are deprecated", :count => 2 - assert_equal result, "2 interpolation syntaxes are deprecated" - 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 syntaxes are deprected", :count => 2 + def test_percent_d_interpolation_syntax_in_error_messages_was_deprecated + assert_not_deprecated do + default = "%d interpolation syntaxes are deprecated" + assert_equal default, I18n.t(:does_not_exist, :default => default, :count => 2) end end |