Skip to content

Commit

Permalink
add activerecord tests for deprecation of %s and %d in error messages…
Browse files Browse the repository at this point in the history
… (and translations in general)

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
Sven Fuchs authored and jeremy committed Sep 11, 2008
1 parent 79c8b10 commit 31dcd78
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions activerecord/test/cases/validations_i18n_test.rb
Expand Up @@ -40,6 +40,18 @@ def test_default_error_messages_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_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

Expand Down

0 comments on commit 31dcd78

Please sign in to comment.