test/backend/exceptions_test.rb in i18n-0.6.4 vs test/backend/exceptions_test.rb in i18n-0.6.5
- old
+ new
@@ -25,6 +25,11 @@
I18n.l(Time.now, :format => :foo)
rescue I18n::MissingTranslationData => exception
end
assert_equal "translation missing: en.time.formats.foo", exception.message
end
+
+ test "exceptions: MissingInterpolationArgument message includes missing key, provided keys and full string" do
+ exception = I18n::MissingInterpolationArgument.new('key', {:this => 'was given'}, 'string')
+ assert_equal 'missing interpolation argument "key" in "string" ({:this=>"was given"} given)', exception.message
+ end
end