diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-15 12:12:43 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-15 14:21:20 +0100 |
commit | f6516d55f75752bf1eb7773f0a09cc6200bc9fad (patch) | |
tree | 751ebcc28d051a83019a6607eb32d5ecb09f5423 /spec/lib | |
parent | 7c5d08c75536d49b6131c16367d99009d167a4b1 (diff) |
Internationalise the salution, making sure it's OK to miss out the public body name as they might in French. Fixes #134.
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/i18n_interpolation.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/i18n_interpolation.rb b/spec/lib/i18n_interpolation.rb new file mode 100644 index 000000000..8c86413ad --- /dev/null +++ b/spec/lib/i18n_interpolation.rb @@ -0,0 +1,15 @@ +# This is a test of the set_content_type monkey patch in +# lib/tmail_extensions.rb + +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe "when using i18n" do + + it "should not complain if we're missing variables from the string" do + result = _('Hello', :dip => 'hummus') + result.should == 'Hello' + result = _('Hello {{dip}}', :dip => 'hummus') + result.should == 'Hello hummus' + end +end + |