12345678910111213141516171819202122232425262728293031323334 |
- # encoding: utf-8
- require 'test_helper'
-
- class TranslationTest < ActiveSupport::TestCase
- test 'translation' do
- tests = [
- # test 1
- {
- :locale => 'en',
- :string => 'New',
- :result => 'New',
- },
- # test 2
- {
- :locale => 'de',
- :string => 'New',
- :result => 'Neu',
- },
- # test 3
- {
- :locale => 'de',
- :string => 'not translated - lalala',
- :result => 'not translated - lalala',
- },
- ]
- tests.each { |test|
- result = Translation.translate( test[:locale], test[:string] )
- assert_equal( result, test[:result], "verify result" )
- }
- end
- end
|