aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/translation_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/translation_helper_test.rb')
-rw-r--r--actionpack/test/template/translation_helper_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/template/translation_helper_test.rb b/actionpack/test/template/translation_helper_test.rb
index 6534df6bbd..a20f3c394c 100644
--- a/actionpack/test/template/translation_helper_test.rb
+++ b/actionpack/test/template/translation_helper_test.rb
@@ -23,4 +23,10 @@ class TranslationHelperTest < Test::Unit::TestCase
I18n.expects(:localize).with(@time)
localize @time
end
+
+ def test_scoping_by_partial
+ expects(:template).returns(stub(:path_without_format_and_extension => "people/index"))
+ I18n.expects(:translate).with("people.index.foo", :locale => 'en', :raise => true)
+ translate ".foo", :locale => 'en'
+ end
end