From 87e31fb1c96788a3bce9229b2fb9065b2dd02be8 Mon Sep 17 00:00:00 2001 From: Ralf Ebert Date: Wed, 4 Aug 2010 16:10:40 +0200 Subject: [PATCH] assert translation_missing for t(nil) as in 2.3.5 and 3.0.0 --- .../test/template/translation_helper_test.rb | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/actionpack/test/template/translation_helper_test.rb b/actionpack/test/template/translation_helper_test.rb index 1be418a..be075bf 100644 --- a/actionpack/test/template/translation_helper_test.rb +++ b/actionpack/test/template/translation_helper_test.rb @@ -18,6 +18,11 @@ class TranslationHelperTest < ActiveSupport::TestCase assert_equal expected, translate(:foo) end + def test_translate_nil + expected = 'en' + assert_equal expected, translate(nil) + end + def test_translation_returning_an_array I18n.expects(:translate).with(:foo, :raise => true).returns(["foo", "bar"]) assert_equal ["foo", "bar"], translate(:foo) -- 1.7.2