public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
add activerecord tests for deprecation of %s and %d in error messages (and 
translations in general)

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
svenfuchs (author)
Wed Sep 10 15:35:58 -0700 2008
jeremy (committer)
Wed Sep 10 19:28:36 -0700 2008
commit  31dcd7811185134f16a52744ad50f87d197ca438
tree    b75dbd660db275269c64adcaf337b93771698b9c
parent  79c8b104d676ce40268caaa530b7e4dcc0a8ff20
...
40
41
42
 
 
 
 
 
 
 
 
 
 
 
 
43
44
45
...
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
0
@@ -40,6 +40,18 @@ class ActiveRecordValidationsI18nTests < Test::Unit::TestCase
0
     end
0
   end
0
 
0
+  def test_percent_s_interpolation_syntax_in_error_messages_is_deprecated
0
+    assert_deprecated('using %s in messages') do
0
+      I18n.t :does_not_exist, :default => "%s interpolation syntax is deprected", :value => 'this'
0
+    end
0
+  end
0
+
0
+  def test_percent_d_interpolation_syntax_in_error_messages_is_deprecated
0
+    assert_deprecated('using %d in messages') do
0
+      I18n.t :does_not_exist, :default => "%d interpolation syntax is deprected", :count => 1
0
+    end
0
+  end
0
+
0
   # ActiveRecord::Errors
0
   uses_mocha 'ActiveRecord::Errors' do
0
 

Comments