Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRaphael Sofaer <raphael@joindiaspora.com>2011-07-30 01:29:41 +0400
committerRaphael Sofaer <raphael@joindiaspora.com>2011-07-30 01:30:20 +0400
commitbea333842fbd9273f6544e50b71e98fa73c4303e (patch)
tree2630e7cf227345453a4f33d8d8297a695faebaec /spec
parentb56838e5b11455ca765b2be62265d6d4b5ab6d7c (diff)
Make sure that a MissingInterpolationArgument in the english locale is raised
Diffstat (limited to 'spec')
-rw-r--r--spec/misc_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/misc_spec.rb b/spec/misc_spec.rb
index d11402caa..83af6674c 100644
--- a/spec/misc_spec.rb
+++ b/spec/misc_spec.rb
@@ -75,6 +75,14 @@ describe 'making sure the spec runner works' do
translation = translate('bob', :hey => "what")
translation.should == "English translation"
end
+ it 'MissingInterpolationError with no fallback is fatal' do
+ I18n.backend.stub!(:lookup).
+ with(:en, 'bob', nil, :hey => "what", :fallback => true).
+ and_return("English translation %{that_will_fail}")
+ lambda {
+ translate('bob', :hey => "what")
+ }.should raise_error I18n::MissingInterpolationArgument
+ end
end
end