diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-05-28 09:22:01 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-05-28 09:22:01 +0100 |
commit | 00a74de49966373832a63efb0d6f702825b6554d (patch) | |
tree | 6243ec8756e13e0b5c0b8b072bf2bebe8f8103b3 /spec/lib/languages_spec.rb | |
parent | fd1c62d447e94503d857b2c3463eef93ab231ca6 (diff) | |
parent | cfb656ca40cbe4e34a5df795bb8514e427c8c708 (diff) |
Merge branch 'locale-specific-language-name' into rails-3-develop
Diffstat (limited to 'spec/lib/languages_spec.rb')
-rw-r--r-- | spec/lib/languages_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/lib/languages_spec.rb b/spec/lib/languages_spec.rb new file mode 100644 index 000000000..38f611087 --- /dev/null +++ b/spec/lib/languages_spec.rb @@ -0,0 +1,22 @@ +# -*- encoding : utf-8 -*- +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe LanguageNames do + + describe :get_language_name do + + it 'should return the name assigned to the language' do + LanguageNames.get_language_name('en').should == 'English' + end + + it 'should return the name assigned to the language when there is no specific location' do + LanguageNames.get_language_name('pt_BR').should == 'Português' + end + + it 'should return the name assigned to the language/location combination' do + LanguageNames.get_language_name('zh_HK').should == '中文(香港)' + end + + end + +end |