aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib/i18n_interpolation.rb
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2011-08-16 12:22:58 +0200
committerDavid Cabo <david@calibea.com>2011-08-16 12:22:58 +0200
commit86e2d5a90185e249cbe2a39074b7fc4a6f7843b3 (patch)
treed745781dc4d268e4c0d37e1a4ec49edab4e0386f /spec/lib/i18n_interpolation.rb
parent95e357b02b75de103d93180e3a33417f0c83dfb3 (diff)
parentf6516d55f75752bf1eb7773f0a09cc6200bc9fad (diff)
Merge branch 'master' of github.com:sebbacon/alaveteli
Diffstat (limited to 'spec/lib/i18n_interpolation.rb')
-rw-r--r--spec/lib/i18n_interpolation.rb15
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
+