diff options
author | Raphael Sofaer <raphael@joindiaspora.com> | 2011-07-30 01:29:41 +0400 |
---|---|---|
committer | Raphael Sofaer <raphael@joindiaspora.com> | 2011-07-30 01:30:20 +0400 |
commit | bea333842fbd9273f6544e50b71e98fa73c4303e (patch) | |
tree | 2630e7cf227345453a4f33d8d8297a695faebaec /spec | |
parent | b56838e5b11455ca765b2be62265d6d4b5ab6d7c (diff) |
Make sure that a MissingInterpolationArgument in the english locale is raised
Diffstat (limited to 'spec')
-rw-r--r-- | spec/misc_spec.rb | 8 |
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 |